From: Vincent Pit Date: Sun, 29 Jun 2008 15:44:01 +0000 (+0200) Subject: Importing Regexp-Wildcards-0.08.tar.gz X-Git-Tag: v0.08^0 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=b59989cf4ef20a00d992f8b249836e8105602f79;p=perl%2Fmodules%2FRegexp-Wildcards.git Importing Regexp-Wildcards-0.08.tar.gz --- diff --git a/Changes b/Changes index 9c39888..c27fcf0 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,12 @@ Revision history for Regexp-Wildcards +0.08 2008-03-09 15:55 UTC + + Add : ':funcs' export tag. + + Doc : Copyright update. + + Fix : Correct dependencies listing in META.yml. + + Tst : Author tests overhaul. + + Tst : t/95-portability-files.t. + 0.07 2007-08-28 12:35 UTC + Fix : Tests are now strict. + Fix : Complete dependencies. diff --git a/MANIFEST b/MANIFEST index b6cdff9..423b999 100644 --- a/MANIFEST +++ b/MANIFEST @@ -11,7 +11,8 @@ t/02-wc2re.t t/10-jokers.t t/11-commas.t t/12-brackets.t -t/boilerplate.t -t/kwalitee.t -t/pod-coverage.t -t/pod.t +t/90-boilerplate.t +t/91-pod.t +t/92-pod-coverage.t +t/95-portability-files.t +t/99-kwalitee.t diff --git a/META.yml b/META.yml index c3a1eaa..9ffffa7 100644 --- a/META.yml +++ b/META.yml @@ -1,16 +1,18 @@ --- #YAML:1.0 name: Regexp-Wildcards -version: 0.07 +version: 0.08 abstract: Converts wildcard expressions to Perl regular expressions. license: perl -generated_by: ExtUtils::MakeMaker version 6.36 +author: + - Vincent Pit +generated_by: ExtUtils::MakeMaker version 6.42 distribution_type: module requires: Exporter: 0 - Test::More: 0 Text::Balanced: 0 meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.2.html - version: 1.2 -author: - - Vincent Pit + url: http://module-build.sourceforge.net/META-spec-v1.3.html + version: 1.3 +build_requires: + ExtUtils::MakeMaker: 0 + Test::More: 0 diff --git a/Makefile.PL b/Makefile.PL index dd135d8..d5ffb9d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,21 +2,36 @@ use strict; use warnings; use ExtUtils::MakeMaker; +my $BUILD_REQUIRES = { + 'ExtUtils::MakeMaker' => 0, + 'Test::More' => 0, +}; + +sub build_req { + my $tometa = ' >> $(DISTVNAME)/META.yml;'; + my $build_req = 'echo "build_requires:" ' . $tometa; + foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) { + my $ver = $BUILD_REQUIRES->{$mod}; + $build_req .= sprintf 'echo " %-30s %s" %s', "$mod:", $ver, $tometa; + } + return $build_req; +} + WriteMakefile( - NAME => 'Regexp::Wildcards', - AUTHOR => 'Vincent Pit ', - LICENSE => 'perl', - VERSION_FROM => 'lib/Regexp/Wildcards.pm', - ABSTRACT_FROM => 'lib/Regexp/Wildcards.pm', - PL_FILES => {}, - PREREQ_PM => { + NAME => 'Regexp::Wildcards', + AUTHOR => 'Vincent Pit ', + LICENSE => 'perl', + VERSION_FROM => 'lib/Regexp/Wildcards.pm', + ABSTRACT_FROM => 'lib/Regexp/Wildcards.pm', + PL_FILES => {}, + PREREQ_PM => { 'Exporter' => 0, - 'Test::More' => 0, 'Text::Balanced' => 0, }, - dist => { - PREOP => 'pod2text lib/Regexp/Wildcards.pm > $(DISTVNAME)/README', - COMPRESS => 'gzip -9f', SUFFIX => 'gz' + dist => { + PREOP => 'pod2text lib/Regexp/Wildcards.pm > $(DISTVNAME)/README; ' + . build_req, + COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, - clean => { FILES => 'Regexp-Wildcards-*' }, + clean => { FILES => 'Regexp-Wildcards-*' }, ); diff --git a/README b/README index 25042a4..93a7721 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME expressions. VERSION - Version 0.07 + Version 0.08 SYNOPSIS use Regexp::Wildcards qw/wc2re/; @@ -178,9 +178,10 @@ SEE ALSO jokers. AUTHOR - Vincent Pit, "" + Vincent Pit, "", . - You can contact me by mail or on #perl @ FreeNode (Prof_Vince). + You can contact me by mail or on #perl @ FreeNode (vincent or + Prof_Vince). BUGS Please report any bugs or feature requests to "bug-regexp-wildcards at @@ -195,7 +196,7 @@ SUPPORT perldoc Regexp::Wildcards COPYRIGHT & LICENSE - Copyright 2007 Vincent Pit, all rights reserved. + Copyright 2007-2008 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 095666e..329e77a 100644 --- a/lib/Regexp/Wildcards.pm +++ b/lib/Regexp/Wildcards.pm @@ -11,11 +11,11 @@ Regexp::Wildcards - Converts wildcard expressions to Perl regular expressions. =head1 VERSION -Version 0.07 +Version 0.08 =cut -our $VERSION = '0.07'; +our $VERSION = '0.08'; =head1 SYNOPSIS @@ -233,12 +233,15 @@ These five functions are exported only on request : C, C, C [ @EXPORT_OK ] ); +our @EXPORT = (); +our %EXPORT_TAGS = ( + 'funcs' => [ 'wc2re', map { 'wc2re_'.$_ } keys %types ], +); +our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; +our @EXPORT_FAIL = qw/extract/, + (map { 'do_'.$_ } qw/jokers sql commas brackets bracketed/), + (map { 'capture_'.$_ } qw/single any brackets/); +$EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; =head1 DEPENDENCIES @@ -260,17 +263,13 @@ L has the C class method that handles joke =head1 AUTHOR -Vincent Pit, C<< >> +Vincent Pit, C<< >>, L. -You can contact me by mail or on #perl @ FreeNode (Prof_Vince). +You can contact me by mail or on #perl @ FreeNode (vincent or Prof_Vince). =head1 BUGS -Please report any bugs or feature requests to -C, or through the web interface at -L. -I will be notified, and then you'll automatically be notified of progress on -your bug as I make changes. +Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT @@ -280,7 +279,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2007 Vincent Pit, all rights reserved. +Copyright 2007-2008 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/t/90-boilerplate.t b/t/90-boilerplate.t new file mode 100644 index 0000000..e42e0f1 --- /dev/null +++ b/t/90-boilerplate.t @@ -0,0 +1,49 @@ +#!perl -T + +use strict; +use warnings; + +use Test::More tests => 3; + +sub not_in_file_ok { + my ($filename, %regex) = @_; + open( my $fh, '<', $filename ) + or die "couldn't open $filename for reading: $!"; + + my %violated; + + while (my $line = <$fh>) { + while (my ($desc, $regex) = each %regex) { + if ($line =~ $regex) { + push @{$violated{$desc}||=[]}, $.; + } + } + } + + if (%violated) { + fail("$filename contains boilerplate text"); + diag "$_ appears on lines @{$violated{$_}}" for keys %violated; + } else { + pass("$filename contains no boilerplate text"); + } +} + +sub module_boilerplate_ok { + my ($module) = @_; + not_in_file_ok($module => + 'the great new $MODULENAME' => qr/ - The great new /, + 'boilerplate description' => qr/Quick summary of what the module/, + 'stub function definition' => qr/function[12]/, + ); +} + +not_in_file_ok(README => + "The README is used..." => qr/The README is used/, + "'version information here'" => qr/to provide version information/, +); + +not_in_file_ok(Changes => + "placeholder date/time" => qr(Date/time) +); + +module_boilerplate_ok('lib/Regexp/Wildcards.pm'); diff --git a/t/91-pod.t b/t/91-pod.t new file mode 100644 index 0000000..62d2d7f --- /dev/null +++ b/t/91-pod.t @@ -0,0 +1,13 @@ +#!perl -T + +use strict; +use warnings; + +use Test::More; + +# Ensure a recent version of Test::Pod +my $min_tp = 1.22; +eval "use Test::Pod $min_tp"; +plan skip_all => "Test::Pod $min_tp required for testing POD" if $@; + +all_pod_files_ok(); diff --git a/t/92-pod-coverage.t b/t/92-pod-coverage.t new file mode 100644 index 0000000..f2a9f19 --- /dev/null +++ b/t/92-pod-coverage.t @@ -0,0 +1,21 @@ +#!perl -T + +use strict; +use warnings; + +use Test::More; + +# Ensure a recent version of Test::Pod::Coverage +my $min_tpc = 1.08; +eval "use Test::Pod::Coverage $min_tpc"; +plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage" if $@; + +# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version, +# but older versions don't recognize some common documentation styles +my $min_pc = 0.18; +eval "use Pod::Coverage $min_pc"; +plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage" if $@; + +all_pod_coverage_ok( + { also_private => [ qr/^do_/, qr/^capture_/, qw/extract/ ] } +); diff --git a/t/95-portability-files.t b/t/95-portability-files.t new file mode 100644 index 0000000..ab541f3 --- /dev/null +++ b/t/95-portability-files.t @@ -0,0 +1,10 @@ +#!perl -T + +use strict; +use warnings; + +use Test::More; + +eval "use Test::Portability::Files"; +plan skip_all => "Test::Portability::Files required for testing filenames portability" if $@; +run_tests(); diff --git a/t/99-kwalitee.t b/t/99-kwalitee.t new file mode 100644 index 0000000..7775e60 --- /dev/null +++ b/t/99-kwalitee.t @@ -0,0 +1,9 @@ +#!perl + +use strict; +use warnings; + +use Test::More; + +eval { require Test::Kwalitee; Test::Kwalitee->import() }; +plan( skip_all => 'Test::Kwalitee not installed; skipping' ) if $@;