From: Vincent Pit Date: Sat, 24 Aug 2013 20:14:25 +0000 (-0300) Subject: This is 1.05 X-Git-Tag: v1.05^0 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=4ce36c10bb682fb575addd550bd8efe104061e00;p=perl%2Fmodules%2FRegexp-Wildcards.git This is 1.05 --- diff --git a/Changes b/Changes index d5dc66b..f58fc98 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,13 @@ Revision history for Regexp-Wildcards +1.05 2013-08-24 20:15 UTC + This is a maintenance release. The code contains no functional change. + Satisfied users of version 1.04 can skip this update. + + Doc : POD headings are now properly linkable. + + Tst : Author tests are no longer bundled with this distribution. + They are only made available to authors in the git repository. + + Upd : Package metadata overhaul. + 1.04 2011-08-25 12:50 UTC + Chg : Minor code cleanups. + Fix : Use Scalar::Util::blessed() to check objects classes. diff --git a/META.json b/META.json index 88cd2fe..b16e050 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Vincent Pit " ], "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150", + "generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.132140", "license" : [ "perl_5" ], @@ -22,23 +22,23 @@ "prereqs" : { "build" : { "requires" : { - "Carp" : 0, - "ExtUtils::MakeMaker" : 0, - "Scalar::Util" : 0, - "Test::More" : 0, - "Text::Balanced" : 0 + "Carp" : "0", + "ExtUtils::MakeMaker" : "0", + "Scalar::Util" : "0", + "Test::More" : "0", + "Text::Balanced" : "0" } }, "configure" : { "requires" : { - "ExtUtils::MakeMaker" : 0 + "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { - "Carp" : 0, - "Scalar::Util" : 0, - "Text::Balanced" : 0, + "Carp" : "0", + "Scalar::Util" : "0", + "Text::Balanced" : "0", "perl" : "5.006" } } @@ -46,7 +46,7 @@ "release_status" : "stable", "resources" : { "bugtracker" : { - "web" : "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Regexp-Wildcards" + "web" : "http://rt.cpan.org/Dist/Display.html?Name=Regexp-Wildcards" }, "homepage" : "http://search.cpan.org/dist/Regexp-Wildcards/", "license" : [ @@ -56,5 +56,5 @@ "url" : "http://git.profvince.com/?p=perl%2Fmodules%2FRegexp-Wildcards.git" } }, - "version" : "1.04" + "version" : "1.05" } diff --git a/META.yml b/META.yml index 0c0ee7a..58aab10 100644 --- a/META.yml +++ b/META.yml @@ -11,7 +11,7 @@ build_requires: configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150' +generated_by: 'ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.132140' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -27,8 +27,8 @@ requires: Text::Balanced: 0 perl: 5.006 resources: - bugtracker: http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Regexp-Wildcards + bugtracker: http://rt.cpan.org/Dist/Display.html?Name=Regexp-Wildcards homepage: http://search.cpan.org/dist/Regexp-Wildcards/ license: http://dev.perl.org/licenses/ repository: http://git.profvince.com/?p=perl%2Fmodules%2FRegexp-Wildcards.git -version: 1.04 +version: 1.05 diff --git a/README b/README index 4e5e7aa..207bc23 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME expressions. VERSION - Version 1.04 + Version 1.05 SYNOPSIS use Regexp::Wildcards; @@ -13,8 +13,10 @@ SYNOPSIS my $re; $re = $rw->convert('a{b?,c}*'); # Do it Unix shell style. $re = $rw->convert('a?,b*', 'win32'); # Do it Windows shell style. - $re = $rw->convert('*{x,y}?', 'jokers'); # Process the jokers and escape the rest. - $re = $rw->convert('%a_c%', 'sql'); # Turn SQL wildcards into regexps. + $re = $rw->convert('*{x,y}?', 'jokers'); # Process the jokers and + # escape the rest. + $re = $rw->convert('%a_c%', 'sql'); # Turn SQL wildcards into + # regexps. $rw = Regexp::Wildcards->new( do => [ qw ], # Do jokers and brackets. @@ -22,7 +24,8 @@ SYNOPSIS ); $rw->do(add => 'groups'); # Don't escape groups. - $rw->capture(rem => [ qw ]); # Actually we want non-greedy matches. + $rw->capture(rem => [ qw ]); # Actually we want non-greedy + # matches. $re = $rw->convert('*a{,(b)?}?c*'); # '(.*?)a(?:|(b).).c(.*?)' $rw->capture(); # No more captures. @@ -41,7 +44,10 @@ DESCRIPTION provided. METHODS - "new [ do => $what | type => $type ], capture => $captures" + "new" + my $rw = Regexp::Wildcards->new(do => $what, capture => $capture); + my $rw = Regexp::Wildcards->new(type => $type, capture => $capture); + Constructs a new Regexp::Wildcard object. "do" lists all features that should be enabled when converting wildcards @@ -54,7 +60,12 @@ METHODS "capture" lists which atoms should be capturing. Refer to "capture" for more details. - "do [ $what | set => $c1, add => $c2, rem => $c3 ]" + "do" + $rw->do($what); + $rw->do(set => $c1); + $rw->do(add => $c2); + $rw->do(rem => $c3); + Specifies the list of metacharacters to convert or to prevent for escaping. They fit into six classes : @@ -125,12 +136,15 @@ METHODS $rw->do(set => 'jokers'); # Only translate jokers. $rw->do('jokers'); # Same. $rw->do(add => [ qw ]); # Translate also SQL and commas. - $rw->do(rem => 'jokers'); # Specifying both 'sql' and 'jokers' is useless. + $rw->do(rem => 'jokers'); # Specifying both 'sql' and + # 'jokers' is useless. $rw->do(); # Translate nothing. The "do" method returns the Regexp::Wildcards object. - "type $type" + "type" + $rw->type($type); + Notifies to convert the metacharacters that corresponds to the predefined type $type. $type can be any of : @@ -169,7 +183,12 @@ METHODS The "type" method returns the Regexp::Wildcards object. - "capture [ $captures | set => $c1, add => $c2, rem => $c3 ]" + "capture" + $rw->capture($captures); + $rw->capture(set => $c1); + $rw->capture(add => $c2); + $rw->capture(rem => $c3); + Specifies the list of atoms to capture. This method works like "do", except that the classes are different : @@ -203,15 +222,20 @@ METHODS 'a{b\\},\\{c}' ==> 'a(b\\}|\\{c)' - $rw->capture(set => 'single'); # Only capture "exactly one" metacharacters. + $rw->capture(set => 'single'); # Only capture "exactly one" + # metacharacters. $rw->capture('single'); # Same. - $rw->capture(add => [ qw ]); # Also greedily capture "any" metacharacters. + $rw->capture(add => [ qw ]); # Also greedily capture + # "any" metacharacters. $rw->capture(rem => 'greedy'); # No more greed please. $rw->capture(); # Capture nothing. The "capture" method returns the Regexp::Wildcards object. - "convert $wc [ , $type ]" + "convert" + my $rx = $rw->convert($wc); + my $rx = $rw->convert($wc, $type); + Converts the wildcard expression $wc into a regular expression according to the options stored into the Regexp::Wildcards object, or to $type if it's supplied. It successively escapes all unprotected regexp special @@ -257,7 +281,7 @@ SUPPORT . COPYRIGHT & LICENSE - Copyright 2007-2009 Vincent Pit, all rights reserved. + Copyright 2007,2008,2009,2013 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/Regexp/Wildcards.pm b/lib/Regexp/Wildcards.pm index 0efd326..581aa36 100644 --- a/lib/Regexp/Wildcards.pm +++ b/lib/Regexp/Wildcards.pm @@ -13,13 +13,13 @@ Regexp::Wildcards - Converts wildcard expressions to Perl regular expressions. =head1 VERSION -Version 1.04 +Version 1.05 =cut use vars qw<$VERSION>; BEGIN { - $VERSION = '1.04'; + $VERSION = '1.05'; } =head1 SYNOPSIS