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.
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
--- #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 <perl@profvince.com>
+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 <perl@profvince.com>
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
+build_requires:
+ ExtUtils::MakeMaker: 0
+ Test::More: 0
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 <perl@profvince.com>',
- LICENSE => 'perl',
- VERSION_FROM => 'lib/Regexp/Wildcards.pm',
- ABSTRACT_FROM => 'lib/Regexp/Wildcards.pm',
- PL_FILES => {},
- PREREQ_PM => {
+ NAME => 'Regexp::Wildcards',
+ AUTHOR => 'Vincent Pit <perl@profvince.com>',
+ 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-*' },
);
expressions.
VERSION
- Version 0.07
+ Version 0.08
SYNOPSIS
use Regexp::Wildcards qw/wc2re/;
jokers.
AUTHOR
- Vincent Pit, "<perl at profvince.com>"
+ Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
- 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
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.
=head1 VERSION
-Version 0.07
+Version 0.08
=cut
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 SYNOPSIS
use base qw/Exporter/;
-our @EXPORT = ();
-our @EXPORT_OK = ('wc2re', map { 'wc2re_'.$_ } keys %types);
-our @EXPORT_FAIL = qw/extract/,
- (map { 'do_'.$_ } qw/jokers sql commas brackets bracketed/),
- (map { 'capture_'.$_ } qw/single any brackets/);
-our %EXPORT_TAGS = ( all => [ @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
=head1 AUTHOR
-Vincent Pit, C<< <perl at profvince.com> >>
+Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
-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<bug-regexp-wildcards at rt.cpan.org>, or through the web interface at
-L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Regexp-Wildcards>.
-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<bug-regexp-wildcards at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Regexp-Wildcards>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
=head1 SUPPORT
=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.
--- /dev/null
+#!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');
--- /dev/null
+#!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();
--- /dev/null
+#!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/ ] }
+);
--- /dev/null
+#!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();
--- /dev/null
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval { require Test::Kwalitee; Test::Kwalitee->import() };
+plan( skip_all => 'Test::Kwalitee not installed; skipping' ) if $@;