r37065 - in /branches/upstream/liborlite-perl/current: ./ inc/Module/ inc/Module/Install/ lib/ t/ t/lib/

nhandler-guest at users.alioth.debian.org nhandler-guest at users.alioth.debian.org
Mon Jun 1 01:46:20 UTC 2009


Author: nhandler-guest
Date: Mon Jun  1 01:46:15 2009
New Revision: 37065

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=37065
Log:
[svn-upgrade] Integrating new upstream version, liborlite-perl (1.22)

Modified:
    branches/upstream/liborlite-perl/current/Changes
    branches/upstream/liborlite-perl/current/META.yml
    branches/upstream/liborlite-perl/current/Makefile.PL
    branches/upstream/liborlite-perl/current/inc/Module/Install.pm
    branches/upstream/liborlite-perl/current/inc/Module/Install/Base.pm
    branches/upstream/liborlite-perl/current/inc/Module/Install/Can.pm
    branches/upstream/liborlite-perl/current/inc/Module/Install/DSL.pm
    branches/upstream/liborlite-perl/current/inc/Module/Install/Fetch.pm
    branches/upstream/liborlite-perl/current/inc/Module/Install/Makefile.pm
    branches/upstream/liborlite-perl/current/inc/Module/Install/Metadata.pm
    branches/upstream/liborlite-perl/current/inc/Module/Install/Win32.pm
    branches/upstream/liborlite-perl/current/inc/Module/Install/With.pm
    branches/upstream/liborlite-perl/current/inc/Module/Install/WriteAll.pm
    branches/upstream/liborlite-perl/current/lib/ORLite.pm
    branches/upstream/liborlite-perl/current/t/02_basics.t
    branches/upstream/liborlite-perl/current/t/06_create.t
    branches/upstream/liborlite-perl/current/t/lib/Test.pm

Modified: branches/upstream/liborlite-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/Changes?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/Changes (original)
+++ branches/upstream/liborlite-perl/current/Changes Mon Jun  1 01:46:15 2009
@@ -1,4 +1,11 @@
 Changes for Perl extension ORLite
+
+1.22 Mon  1 Jun 2009
+	- Updated to Module::Install::DSL 0.91
+	- Split out debug/eval as (undocument) dval function
+	- App support for a (currently undocumented) 'append'
+	  param to allow sub-classes like ORLite::Mirror to merge
+	  in additional code to the generated class.
 
 1.21 Sun 24 May 2009
 	- Updated to Module::Install::DSL 0.88

Modified: branches/upstream/liborlite-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/META.yml?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/META.yml (original)
+++ branches/upstream/liborlite-perl/current/META.yml Mon Jun  1 01:46:15 2009
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 0.90'
+generated_by: 'Module::Install version 0.91'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -32,4 +32,4 @@
   ChangeLog: http://fisheye2.atlassian.com/changelog/cpan/trunk/ORLite
   license: http://dev.perl.org/licenses/
   repository: http://svn.ali.as/cpan/trunk/ORLite
-version: 1.21
+version: 1.22

Modified: branches/upstream/liborlite-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/Makefile.PL?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/Makefile.PL (original)
+++ branches/upstream/liborlite-perl/current/Makefile.PL Mon Jun  1 01:46:15 2009
@@ -1,4 +1,4 @@
-use inc::Module::Install::DSL 0.88;
+use inc::Module::Install::DSL 0.91;
 
 all_from      lib/ORLite.pm
 requires_from lib/ORLite.pm

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install.pm Mon Jun  1 01:46:15 2009
@@ -28,7 +28,7 @@
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.90';
+	$VERSION = '0.91';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install/Base.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install/Base.pm Mon Jun  1 01:46:15 2009
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.90';
+	$VERSION = '0.91';
 }
 
 # Suspend handler for "redefined" warnings

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install/Can.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install/Can.pm Mon Jun  1 01:46:15 2009
@@ -9,7 +9,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.90';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install/DSL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install/DSL.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install/DSL.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install/DSL.pm Mon Jun  1 01:46:15 2009
@@ -4,7 +4,7 @@
 use strict;
 use vars qw{$VERSION $ISCORE};
 BEGIN {
-	$VERSION = '0.90';
+	$VERSION = '0.91';
 	$ISCORE  = 1;
 	*inc::Module::Install::DSL::VERSION = *VERSION;
 	@inc::Module::Install::DSL::ISA     = __PACKAGE__;

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install/Fetch.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install/Fetch.pm Mon Jun  1 01:46:15 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.90';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install/Makefile.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install/Makefile.pm Mon Jun  1 01:46:15 2009
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.90';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install/Metadata.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install/Metadata.pm Mon Jun  1 01:46:15 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.90';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -505,6 +505,17 @@
 	}
 }
 
+sub test_requires_from {
+	my $self     = shift;
+	my $content  = Module::Install::_readperl($_[0]);
+	my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+	while ( @requires ) {
+		my $module  = shift @requires;
+		my $version = shift @requires;
+		$self->test_requires( $module => $version );
+	}
+}
+
 # Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
 # numbers (eg, 5.006001 or 5.008009).
 # Also, convert double-part versions (eg, 5.8)

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install/Win32.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install/Win32.pm Mon Jun  1 01:46:15 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.90';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install/With.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install/With.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install/With.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install/With.pm Mon Jun  1 01:46:15 2009
@@ -8,7 +8,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.90';
+	$VERSION = '0.91';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: branches/upstream/liborlite-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/inc/Module/Install/WriteAll.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/liborlite-perl/current/inc/Module/Install/WriteAll.pm Mon Jun  1 01:46:15 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.90';;
+	$VERSION = '0.91';;
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: branches/upstream/liborlite-perl/current/lib/ORLite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/lib/ORLite.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/lib/ORLite.pm (original)
+++ branches/upstream/liborlite-perl/current/lib/ORLite.pm Mon Jun  1 01:46:15 2009
@@ -4,18 +4,18 @@
 
 use 5.006;
 use strict;
-use Carp                 ();
-use File::Spec      0.80 ();
-use File::Temp      0.20 ();
-use File::Path      2.04 ();
-use File::Basename     0 ();
-use Params::Util    0.33 qw{ _STRING _CLASS _HASHLIKE _CODELIKE };
-use DBI            1.607 ();
-use DBD::SQLite     1.25 ();
+use Carp              ();
+use File::Spec   0.80 ();
+use File::Temp   0.20 ();
+use File::Path   2.04 ();
+use File::Basename  0 ();
+use Params::Util 0.33 qw{ _STRING _CLASS _HASHLIKE _CODELIKE };
+use DBI         1.607 ();
+use DBD::SQLite  1.25 ();
 
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '1.21';
+	$VERSION = '1.22';
 }
 
 
@@ -103,7 +103,7 @@
 	}
 
 	# Generate the support package code
-	my $code  = <<"END_PERL";
+	my $code = <<"END_PERL";
 package $pkg;
 
 use strict;
@@ -366,29 +366,41 @@
 	}
 	$dbh->disconnect;
 
+	# Add any custom code to the end
+	if ( defined $params{append} ) {
+		$code .= "\npackage $pkg;\n" if $params{tables};
+		$code .= "\n$params{append}";
+	}
+
 	# Load the code
 	if ( $DEBUG ) {
-		# Compile the combined code via a temp file
-		my ($fh, $filename) = File::Temp::tempfile();
-		$fh->print("$code\n\n1;\n");
-		close $fh;
-		require $filename;
-		unlink $filename;
-
-		# Print the debugging output
-		my @trace = map {
-			s/\s*[{;]$//;
-			s/^s/  s/;
-			s/^p/\np/;
-			"$_\n"
-		} grep {
-			/^(?:package|sub)\b/
-		} split /\n/, $code;
-		print STDERR @trace, "\n$pkg code saved as $filename\n\n";
+		dval("$code\n\n1;\n");
 	} else {
 		eval("$code\n\n1;\n");
 		die $@ if $@;
 	}
+
+	return 1;
+}
+
+sub dval {
+	# Write the code to the temp file
+	my ($fh, $filename) = File::Temp::tempfile();
+	$fh->print($_[0]);
+	close $fh;
+	require $filename;
+	unlink $filename;
+
+	# Print the debugging output
+	my @trace = map {
+		s/\s*[{;]$//;
+		s/^s/  s/;
+		s/^p/\np/;
+		"$_\n"
+	} grep {
+		/^(?:package|sub)\b/
+	} split /\n/, $_[0];
+	print STDERR @trace, "\nCode saved as $filename\n\n";
 
 	return 1;
 }

Modified: branches/upstream/liborlite-perl/current/t/02_basics.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/t/02_basics.t?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/t/02_basics.t (original)
+++ branches/upstream/liborlite-perl/current/t/02_basics.t Mon Jun  1 01:46:15 2009
@@ -36,7 +36,7 @@
 package Foo::Bar;
 
 use strict;
-use ORLite '$file', -DEBUG;
+use ORLite '$file';
 
 1;
 END_PERL

Modified: branches/upstream/liborlite-perl/current/t/06_create.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/t/06_create.t?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/t/06_create.t (original)
+++ branches/upstream/liborlite-perl/current/t/06_create.t Mon Jun  1 01:46:15 2009
@@ -9,7 +9,7 @@
 	$^W = 1;
 }
 
-use Test::More tests => 19;
+use Test::More tests => 20;
 use File::Spec::Functions ':ALL';
 use t::lib::Test;
 
@@ -33,7 +33,8 @@
 	file   => '$file',
 	create => 1,
 	tables => 0,
-};
+	append => 'sub append { 2 }',
+}, -DEBUG;
 
 1;
 END_PERL
@@ -50,6 +51,9 @@
 	# Test that the schema_version is updated as expected
 	ok( My::Test1->do('create table foo ( bar int )'), 'Created test table' );
 	is( My::Test1->pragma('schema_version' ), 1, 'schema_version is zero' );
+
+	# Test the appending of additional code
+	is( My::Test1->append, 2, 'append params works as expected' );
 }
 
 
@@ -75,8 +79,8 @@
 
 		# Set up the test database
 		\$dbh->do( 'create table foo ( bar int not null primary key )' );
-		\$dbh->do( 'pragma user_version = 2'      );
-		\$dbh->do( 'insert into foo values ( 5 )'        );
+		\$dbh->do( 'pragma user_version = 2' );
+		\$dbh->do( 'insert into foo values ( 5 )' );
 		\$dbh->do( 'insert into foo values ( ? )', {}, 7 );
 
 		return 1;

Modified: branches/upstream/liborlite-perl/current/t/lib/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-perl/current/t/lib/Test.pm?rev=37065&op=diff
==============================================================================
--- branches/upstream/liborlite-perl/current/t/lib/Test.pm (original)
+++ branches/upstream/liborlite-perl/current/t/lib/Test.pm Mon Jun  1 01:46:15 2009
@@ -8,8 +8,8 @@
 
 use vars qw{$VERSION @ISA @EXPORT};
 BEGIN {
-        $VERSION = '1.21';
-	@ISA     = qw{ Exporter };
+        $VERSION = '1.22';
+	@ISA     = 'Exporter';
 	@EXPORT  = qw{ test_db connect_ok create_ok };
 }
 




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