Skip to content

Commit

Permalink
require perl 5.010
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-37 committed Feb 9, 2025
1 parent 950b04e commit b53793e
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use 5.006;
use 5.010;
use strict;
use warnings;
use ExtUtils::MakeMaker;
Expand All @@ -10,7 +10,7 @@ my %WriteMakefileArgs = (
VERSION_FROM => 'lib/String/Compile/Tr.pm',
ABSTRACT_FROM => 'lib/String/Compile/Tr.pm',
LICENSE => 'perl_5',
MIN_PERL_VERSION => '5.006',
MIN_PERL_VERSION => '5.010',
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '0',
'Config' => '0',
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ eval "tr/$search//d";

`String::Compile::Tr` offers an alternative where the content of a
variable can be used as operand without `eval`'ing it.
Instead the operands of a `tr///` operator are overloaded at runtime
inside an constant `eval '...'`.

`trgen(*SEARCH*, *REPLACE*, *OPT*)` compiles an anonymous sub that
performs almost the same operation as `tr/*SEARCH*/*REPLACE*/*OPT*`,
Expand All @@ -54,10 +56,8 @@ or is the default input `$_` otherwise.

# ERRORS

`trgen` will throw an exception if an invalid option is specified.

When the `tr` operation cannot be compiled, `trgen` will return
`undef`.
`trgen` will throw an exception if an invalid option is specified
or the `tr` operation cannot be compiled.

# EXAMPLES

Expand Down Expand Up @@ -88,6 +88,8 @@ This is caused by the fact that `tr` does not support these neither.
It's the compiler that expands character ranges in `tr`'s operands
before handing them over.

Overloading constants in `eval '...'` requires perl v5.10.

# AUTHOR

Jörg Sommrey, `<git at sommrey.de>`
Expand Down
12 changes: 7 additions & 5 deletions lib/String/Compile/Tr.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use 5.006;
use 5.010;
use strict;
use warnings;

Expand Down Expand Up @@ -42,6 +42,8 @@ by the variables' content, e.g.
C<String::Compile::Tr> offers an alternative where the content of a
variable can be used as operand without C<eval>'ing it.
Instead the operands of a C<tr///> operator are overloaded at runtime
inside an constant C<eval '...'>.
C<trgen(*SEARCH*, *REPLACE*, *OPT*)> compiles an anonymous sub that
performs almost the same operation as C<tr/*SEARCH*/*REPLACE*/*OPT*>,
Expand All @@ -64,10 +66,8 @@ or is the default input C<$_> otherwise.
=head1 ERRORS
C<trgen> will throw an exception if an invalid option is specified.
When the C<tr> operation cannot be compiled, C<trgen> will return
C<undef>.
C<trgen> will throw an exception if an invalid option is specified
or the C<tr> operation cannot be compiled.
=head1 EXAMPLES
Expand Down Expand Up @@ -96,6 +96,8 @@ This is caused by the fact that C<tr> does not support these neither.
It's the compiler that expands character ranges in C<tr>'s operands
before handing them over.
Overloading constants in C<eval '...'> requires perl v5.10.
=head1 AUTHOR
Jörg Sommrey, C<< <git at sommrey.de> >>
Expand Down
2 changes: 1 addition & 1 deletion lib/String/Compile/Tr/Overload.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use 5.006;
use 5.010;
use strict;
use warnings;

Expand Down
2 changes: 1 addition & 1 deletion t/00-load.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!perl
use 5.006;
use 5.010;
use strict;
use warnings;
use Test::More;
Expand Down
2 changes: 1 addition & 1 deletion t/manifest.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!perl
use 5.006;
use 5.010;
use strict;
use warnings;
use Test::More;
Expand Down
2 changes: 1 addition & 1 deletion t/pod-coverage.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!perl
use 5.006;
use 5.010;
use strict;
use warnings;
use Test::More;
Expand Down
2 changes: 1 addition & 1 deletion t/pod.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!perl
use 5.006;
use 5.010;
use strict;
use warnings;
use Test::More;
Expand Down
2 changes: 1 addition & 1 deletion t/stdtests.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!perl

use 5.006;
use 5.010;
use Test2::V0;

use String::Compile::Tr;
Expand Down
2 changes: 1 addition & 1 deletion tt/taint.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!perl -T

use 5.006;
use 5.010;
use Test2::V0;

use String::Compile::Tr;
Expand Down
2 changes: 1 addition & 1 deletion xt/boilerplate.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!perl
use 5.006;
use 5.010;
use strict;
use warnings;
use Test::More;
Expand Down

0 comments on commit b53793e

Please sign in to comment.