r41015 - in /trunk/libfile-find-rule-perl-perl: Changes MANIFEST META.yml Makefile.PL debian/changelog inc/Module/Install/DSL.pm inc/Module/Install/With.pm lib/File/Find/Rule/Perl.pm t/03_no_index.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Thu Jul 30 18:49:02 UTC 2009


Author: jawnsy-guest
Date: Thu Jul 30 18:48:55 2009
New Revision: 41015

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41015
Log:
No release necessary
IGNORE-VERSION: 1.09-1
* New upstream release
  + Fix for Win32

Added:
    trunk/libfile-find-rule-perl-perl/inc/Module/Install/DSL.pm
Removed:
    trunk/libfile-find-rule-perl-perl/inc/Module/Install/With.pm
Modified:
    trunk/libfile-find-rule-perl-perl/Changes
    trunk/libfile-find-rule-perl-perl/MANIFEST
    trunk/libfile-find-rule-perl-perl/META.yml
    trunk/libfile-find-rule-perl-perl/Makefile.PL
    trunk/libfile-find-rule-perl-perl/debian/changelog
    trunk/libfile-find-rule-perl-perl/lib/File/Find/Rule/Perl.pm
    trunk/libfile-find-rule-perl-perl/t/03_no_index.t

Modified: trunk/libfile-find-rule-perl-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-find-rule-perl-perl/Changes?rev=41015&op=diff
==============================================================================
--- trunk/libfile-find-rule-perl-perl/Changes (original)
+++ trunk/libfile-find-rule-perl-perl/Changes Thu Jul 30 18:48:55 2009
@@ -1,10 +1,13 @@
 Revision history for Perl extension File-Find-Rule-Perl
 
+1.09 Thu 30 Jul 2009
+	- 1.08 broke Windows. This unbreaks it again (ADAMK)
+
 1.08 Thu 16 Jul 2009
-  - Added the debian/ directory to the list of skipped paths (RT#47921)
+	- Added the debian/ directory to the list of skipped paths (RT#47921)
 
 1.07 Wed 15 Jul 2009
-  - Fix no_index regression with absolute paths (RT#47633)
+	- Fix no_index regression with absolute paths (RT#47633)
 
 1.06 Mon 13 Apr 2009
 	- Upgraded to Module::Install 0.82 (ADAMK)

Modified: trunk/libfile-find-rule-perl-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-find-rule-perl-perl/MANIFEST?rev=41015&op=diff
==============================================================================
--- trunk/libfile-find-rule-perl-perl/MANIFEST (original)
+++ trunk/libfile-find-rule-perl-perl/MANIFEST Thu Jul 30 18:48:55 2009
@@ -2,11 +2,11 @@
 inc/Module/Install.pm
 inc/Module/Install/Base.pm
 inc/Module/Install/Can.pm
+inc/Module/Install/DSL.pm
 inc/Module/Install/Fetch.pm
 inc/Module/Install/Makefile.pm
 inc/Module/Install/Metadata.pm
 inc/Module/Install/Win32.pm
-inc/Module/Install/With.pm
 inc/Module/Install/WriteAll.pm
 lib/File/Find/Rule/Perl.pm
 LICENSE

Modified: trunk/libfile-find-rule-perl-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-find-rule-perl-perl/META.yml?rev=41015&op=diff
==============================================================================
--- trunk/libfile-find-rule-perl-perl/META.yml (original)
+++ trunk/libfile-find-rule-perl-perl/META.yml Thu Jul 30 18:48:55 2009
@@ -23,10 +23,10 @@
   File::Find::Rule: 0.20
   File::Spec: 0.82
   Params::Util: 0.38
-  Parse::CPAN::Meta: 0.04
+  Parse::CPAN::Meta: 1.38
   perl: 5.00503
 resources:
   ChangeLog: http://fisheye2.atlassian.com/changelog/cpan/trunk/File-Find-Rule-Perl
   license: http://dev.perl.org/licenses/
   repository: http://svn.ali.as/cpan/trunk/File-Find-Rule-Perl
-version: 1.08
+version: 1.09

Modified: trunk/libfile-find-rule-perl-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-find-rule-perl-perl/Makefile.PL?rev=41015&op=diff
==============================================================================
--- trunk/libfile-find-rule-perl-perl/Makefile.PL (original)
+++ trunk/libfile-find-rule-perl-perl/Makefile.PL Thu Jul 30 18:48:55 2009
@@ -1,10 +1,5 @@
-use inc::Module::Install 0.82;
+use inc::Module::Install::DSL 0.91;
 
-all_from      'lib/File/Find/Rule/Perl.pm';
-requires      'File::Spec'        => winlike() ? '3.27' : '0.82';
-requires      'File::Find::Rule'  => '0.20';
-requires      'Params::Util'      => '0.38';
-requires      'Parse::CPAN::Meta' => '0.04';
-test_requires 'Test::More'        => '0.47';
-
-WriteAll;
+all_from      lib/File/Find/Rule/Perl.pm
+requires_from lib/File/Find/Rule/Perl.pm
+test_requires Test::More 0.47

Modified: trunk/libfile-find-rule-perl-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-find-rule-perl-perl/debian/changelog?rev=41015&op=diff
==============================================================================
--- trunk/libfile-find-rule-perl-perl/debian/changelog (original)
+++ trunk/libfile-find-rule-perl-perl/debian/changelog Thu Jul 30 18:48:55 2009
@@ -1,3 +1,13 @@
+libfile-find-rule-perl-perl (1.09-1) UNRELEASED; urgency=low
+
+  No release necessary
+  IGNORE-VERSION: 1.09-1
+
+  * New upstream release
+    + Fix for Win32
+
+ -- Jonathan Yu <frequency at cpan.org>  Thu, 30 Jul 2009 10:47:26 -0400
+
 libfile-find-rule-perl-perl (1.08-1) unstable; urgency=low
 
   * New upstream release

Added: trunk/libfile-find-rule-perl-perl/inc/Module/Install/DSL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-find-rule-perl-perl/inc/Module/Install/DSL.pm?rev=41015&op=file
==============================================================================
--- trunk/libfile-find-rule-perl-perl/inc/Module/Install/DSL.pm (added)
+++ trunk/libfile-find-rule-perl-perl/inc/Module/Install/DSL.pm Thu Jul 30 18:48:55 2009
@@ -1,0 +1,92 @@
+#line 1
+package Module::Install::DSL;
+
+use strict;
+use vars qw{$VERSION $ISCORE};
+BEGIN {
+	$VERSION = '0.91';
+	$ISCORE  = 1;
+	*inc::Module::Install::DSL::VERSION = *VERSION;
+	@inc::Module::Install::DSL::ISA     = __PACKAGE__;
+}
+
+sub import {
+	# Read in the rest of the Makefile.PL
+	open 0 or die "Couldn't open $0: $!";
+	my $dsl;
+	SCOPE: {
+		local $/ = undef;
+		$dsl = join "", <0>;
+	}
+
+	# Change inc::Module::Install::DSL to the regular one.
+	# Remove anything before the use inc::... line.
+	$dsl =~ s/.*?^\s*use\s+(?:inc::)?Module::Install::DSL(\b[^;]*);\s*\n//sm;
+
+	# Load inc::Module::Install as we would in a regular Makefile.Pl
+	SCOPE: {
+		package main;
+		require inc::Module::Install;
+		inc::Module::Install->import;
+	}
+
+	# Add the ::DSL plugin to the list of packages in /inc
+	my $admin = $Module::Install::MAIN->{admin};
+	if ( $admin ) {
+		my $from = $INC{"$admin->{path}/DSL.pm"};
+		my $to   = "$admin->{base}/$admin->{prefix}/$admin->{path}/DSL.pm";
+		$admin->copy( $from => $to );
+	}
+
+	# Convert the basic syntax to code
+	my $code = "package main;\n\n"
+	         . dsl2code($dsl)
+	         . "\n\nWriteAll();\n";
+
+	# Execute the script
+	eval $code;
+	print STDERR "Failed to execute the generated code" if $@;
+
+	exit(0);
+}
+
+sub dsl2code {
+	my $dsl = shift;
+
+	# Split into lines and strip blanks
+	my @lines = grep { /\S/ } split /[\012\015]+/, $dsl;
+
+	# Each line represents one command
+	my @code = ();
+	foreach my $line ( @lines ) {
+		# Split the lines into tokens
+		my @tokens = split /\s+/, $line;
+
+		# The first word is the command
+		my $command = shift @tokens;
+		my @params  = ();
+		my @suffix  = ();
+		while ( @tokens ) {
+			my $token = shift @tokens;
+			if ( $token eq 'if' or $token eq 'unless' ) {
+				# This is the beginning of a suffix
+				push @suffix, $token;
+				push @suffix, @tokens;
+				last;
+			} else {
+				# Convert to a string
+				$token =~ s/([\\\'])/\\$1/g;
+				push @params, "'$token'";
+			}	
+		};
+
+		# Merge to create the final line of code
+		@tokens = ( $command, @params ? join( ', ', @params ) : (), @suffix );
+		push @code, join( ' ', @tokens ) . ";\n";
+	}
+
+	# Join into the complete code block
+	return join( '', @code );
+}
+
+1;

Modified: trunk/libfile-find-rule-perl-perl/lib/File/Find/Rule/Perl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-find-rule-perl-perl/lib/File/Find/Rule/Perl.pm?rev=41015&op=diff
==============================================================================
--- trunk/libfile-find-rule-perl-perl/lib/File/Find/Rule/Perl.pm (original)
+++ trunk/libfile-find-rule-perl-perl/lib/File/Find/Rule/Perl.pm Thu Jul 30 18:48:55 2009
@@ -39,15 +39,15 @@
 use strict;
 use Carp;
 use UNIVERSAL;
-use File::Spec        ();
-use File::Spec::Unix  ();
-use Params::Util      qw{ _STRING _HASHLIKE };
-use File::Find::Rule  ();
-use Parse::CPAN::Meta ();
+use File::Spec        0.82 ();
+use File::Spec::Unix       ();
+use Params::Util      0.38 qw{ _STRING _HASHLIKE };
+use File::Find::Rule  0.20 ();
+use Parse::CPAN::Meta 1.38 ();
 
 use vars qw{$VERSION @ISA @EXPORT};
 BEGIN {
-	$VERSION = '1.08';
+	$VERSION = '1.09';
 	@ISA     = 'File::Find::Rule';
 	@EXPORT  = @File::Find::Rule::EXPORT;
 }

Modified: trunk/libfile-find-rule-perl-perl/t/03_no_index.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfile-find-rule-perl-perl/t/03_no_index.t?rev=41015&op=diff
==============================================================================
--- trunk/libfile-find-rule-perl-perl/t/03_no_index.t (original)
+++ trunk/libfile-find-rule-perl-perl/t/03_no_index.t Thu Jul 30 18:48:55 2009
@@ -65,36 +65,44 @@
 # in no_index and in search prefix.
 
 SCOPE: {
-  my @params = (
-    {
-      name => 'Relative Path',
-      path => 'lib/File/Find/Rule/Perl.pm',
-      dir  => curdir(),
-      check => qr{Rule/Perl\.pm},
-    },
-    {
-      name => 'Absolute path, Absolute Dir',
-      path => rel2abs(curdir()) .'/lib/File/Find/Rule/Perl.pm',
-      dir => rel2abs(curdir()),
-      check => qr{Rule/Perl\.pm},
-    },
-  );
+	my @params = (
+		{
+			name  => 'Relative Path',
+			path  => 'lib/File/Find/Rule/Perl.pm',
+			dir   => curdir(),
+			check => [ 'Rule', 'Perl.pm' ],
+		},
+		{
+			name  => 'Absolute path, Absolute Dir',
+			path  => rel2abs(curdir())
+			       . '/lib/File/Find/Rule/Perl.pm',
+			dir   => rel2abs(curdir()),
+			check => [ 'Rule', 'Perl.pm' ],
+		},
+	);
 
-  foreach my $p (@params) {
-    my $rule = FFR->relative->no_index({ file => [ $p->{path} ] })->file;
+	foreach my $p ( @params ) {
+		my $check = quotemeta File::Spec->catfile( @{$p->{check}} );
+		my $regex = qr/$check/;
+		my $rule  = FFR->relative->no_index( {
+			file => [ $p->{path} ]
+		} )->file;
 
-    my @files = sort grep { $_ !~ m/\bblib\b/ && $_ =~ $p->{check}} $rule->in( $p->{dir} );
+		my @files = sort grep {
+			$_ !~ m/\bblib\b/ and $_ =~ $regex
+		} $rule->in( $p->{dir} );
 
-    if( @files ){ 
-        ok( 0, 'No_index + filename ' . $p->{name} );
-        for( @files ){
-            diag( "File Found: $_ \n , no_index file was <$p->{path}>");
-        }
-    } else { 
-        ok( 1, 'No_index + filename ' . $p->{name} );
-    }
-  }
+		if ( @files ) {
+			ok( 0, 'No_index + filename ' . $p->{name} );
+			for ( @files ) {
+				diag( "File Found: $_ \n , no_index file was <$p->{path}>");
+			}
+		} else { 
+			ok( 1, 'No_index + filename ' . $p->{name} );
+		}
+	}
 }
+
 
 
 




More information about the Pkg-perl-cvs-commits mailing list