r30846 - in /branches/upstream/liborlite-migrate-perl/current: ./ inc/Module/ inc/Module/Install/ lib/ORLite/
bricas-guest at users.alioth.debian.org
bricas-guest at users.alioth.debian.org
Wed Feb 18 14:18:01 UTC 2009
Author: bricas-guest
Date: Wed Feb 18 14:17:50 2009
New Revision: 30846
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=30846
Log:
[svn-upgrade] Integrating new upstream version, liborlite-migrate-perl (0.02)
Modified:
branches/upstream/liborlite-migrate-perl/current/Changes
branches/upstream/liborlite-migrate-perl/current/META.yml
branches/upstream/liborlite-migrate-perl/current/Makefile.PL
branches/upstream/liborlite-migrate-perl/current/README
branches/upstream/liborlite-migrate-perl/current/inc/Module/Install.pm
branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Base.pm
branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Can.pm
branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Fetch.pm
branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Win32.pm
branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/With.pm
branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/WriteAll.pm
branches/upstream/liborlite-migrate-perl/current/lib/ORLite/Migrate.pm
Modified: branches/upstream/liborlite-migrate-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/Changes?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/Changes (original)
+++ branches/upstream/liborlite-migrate-perl/current/Changes Wed Feb 18 14:17:50 2009
@@ -1,4 +1,9 @@
-Changes for Perl extension ORLite
+Changes for Perl extension ORLite-Migrate
+
+0.02 Mon 16 Feb 2009
+ - Updating to Module::Install 0.79
+ - Support creation of database in subdirectories
+ - Updating ORLite minimum version
0.01 Fri 13 Dec 2008
- Create an initial experimental implementation
Modified: branches/upstream/liborlite-migrate-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/META.yml?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/META.yml (original)
+++ branches/upstream/liborlite-migrate-perl/current/META.yml Wed Feb 18 14:17:50 2009
@@ -5,7 +5,7 @@
build_requires:
Test::More: 0.47
distribution_type: module
-generated_by: 'Module::Install version 0.77'
+generated_by: 'Module::Install version 0.79'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -19,13 +19,14 @@
requires:
DBD::SQLite: 1.14
DBI: 1.58
+ File::Path: 2.04
File::Spec: 0.80
- File::pushd: 0
- IPC::Run3: 0
- ORLite: 1.16
- Params::Util: 0.33
- Probe::Perl: 0
+ File::pushd: 1.00
+ IPC::Run3: 0.042
+ ORLite: 1.20
+ Params::Util: 0.37
+ Probe::Perl: 0.01
perl: 5.6.0
resources:
license: http://dev.perl.org/licenses/
-version: 0.01
+version: 0.02
Modified: branches/upstream/liborlite-migrate-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/Makefile.PL?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/Makefile.PL (original)
+++ branches/upstream/liborlite-migrate-perl/current/Makefile.PL Wed Feb 18 14:17:50 2009
@@ -1,14 +1,15 @@
-use inc::Module::Install 0.77;
+use inc::Module::Install 0.79;
all_from 'lib/ORLite/Migrate.pm';
requires 'File::Spec' => winlike() ? '3.2701' : '0.80';
-requires 'File::pushd' => 0;
-requires 'IPC::Run3' => 0;
-requires 'Params::Util' => '0.33';
-requires 'Probe::Perl' => 0;
+requires 'File::Path' => '2.04';
+requires 'File::pushd' => '1.00';
+requires 'IPC::Run3' => '0.042';
+requires 'Params::Util' => '0.37';
+requires 'Probe::Perl' => '0.01';
requires 'DBI' => '1.58';
requires 'DBD::SQLite' => '1.14';
-requires 'ORLite' => '1.16';
+requires 'ORLite' => '1.20';
test_requires 'Test::More' => '0.47';
WriteAll;
Modified: branches/upstream/liborlite-migrate-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/README?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/README (original)
+++ branches/upstream/liborlite-migrate-perl/current/README Wed Feb 18 14:17:50 2009
@@ -109,7 +109,7 @@
Adam Kennedy <adamk at cpan.org>
COPYRIGHT
- Copyright 2008 Adam Kennedy.
+ Copyright 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: branches/upstream/liborlite-migrate-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/inc/Module/Install.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/inc/Module/Install.pm Wed Feb 18 14:17:50 2009
@@ -30,7 +30,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.77';
+ $VERSION = '0.79';
*inc::Module::Install::VERSION = *VERSION;
@inc::Module::Install::ISA = __PACKAGE__;
@@ -250,7 +250,7 @@
sub load_extensions {
my ($self, $path, $top) = @_;
- unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+ unless ( grep { !ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
unshift @INC, $self->{prefix};
}
@@ -366,4 +366,4 @@
1;
-# Copyright 2008 Adam Kennedy.
+# Copyright 2008 - 2009 Adam Kennedy.
Modified: branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Base.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Base.pm Wed Feb 18 14:17:50 2009
@@ -1,7 +1,7 @@
#line 1
package Module::Install::Base;
-$VERSION = '0.77';
+$VERSION = '0.79';
# Suspend handler for "redefined" warnings
BEGIN {
Modified: branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Can.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Can.pm Wed Feb 18 14:17:50 2009
@@ -11,7 +11,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.77';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Fetch.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Fetch.pm Wed Feb 18 14:17:50 2009
@@ -6,20 +6,20 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.77';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub get_file {
my ($self, %args) = @_;
- my ($scheme, $host, $path, $file) =
+ my ($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
$args{url} = $args{ftp_url}
or (warn("LWP support unavailable!\n"), return);
- ($scheme, $host, $path, $file) =
+ ($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
}
Modified: branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Makefile.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Makefile.pm Wed Feb 18 14:17:50 2009
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.77';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -64,7 +64,7 @@
my $self = shift;
my $clean = $self->makemaker_args->{clean} ||= {};
%$clean = (
- %$clean,
+ %$clean,
FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_),
);
}
@@ -73,7 +73,7 @@
my $self = shift;
my $realclean = $self->makemaker_args->{realclean} ||= {};
%$realclean = (
- %$realclean,
+ %$realclean,
FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_),
);
}
@@ -124,7 +124,7 @@
$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
- # Generate the
+ # Generate the
my $args = $self->makemaker_args;
$args->{DISTNAME} = $self->name;
$args->{NAME} = $self->module_name || $self->name;
@@ -196,7 +196,7 @@
my $top_class = ref($self->_top) || '';
my $top_version = $self->_top->VERSION || '';
- my $preamble = $self->preamble
+ my $preamble = $self->preamble
? "# Preamble by $top_class $top_version\n"
. $self->preamble
: '';
Modified: branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Metadata.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Metadata.pm Wed Feb 18 14:17:50 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.77';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -176,18 +176,15 @@
"Did not provide a value to perl_version()"
);
- # Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
- # numbers (eg, 5.006001 or 5.008009).
-
- $version =~ s/^(\d+)\.(\d+)\.(\d+)$/sprintf("%d.%03d%03d",$1,$2,$3)/e;
-
- $version =~ s/_.+$//;
- $version = $version + 0; # Numify
+ # Normalize the version
+ $version = $self->_perl_version($version);
+
+ # We don't support the reall old versions
unless ( $version >= 5.005 ) {
die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
}
+
$self->{values}{perl_version} = $version;
- return 1;
}
sub license {
@@ -451,9 +448,6 @@
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
- if ( $osi and $license_text =~ /All rights reserved/i ) {
- print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
- }
$self->license($license);
return 1;
}
@@ -482,19 +476,70 @@
return 1;
}
-sub install_script {
- my $self = shift;
- my $args = $self->makemaker_args;
- my $exe = $args->{EXE_FILES} ||= [];
- foreach ( @_ ) {
- if ( -f $_ ) {
- push @$exe, $_;
- } elsif ( -d 'script' and -f "script/$_" ) {
- push @$exe, "script/$_";
- } else {
- die("Cannot find script '$_'");
- }
- }
+# 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)
+sub _perl_version {
+ my $v = $_[-1];
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
+ $v =~ s/(\.\d\d\d)000$/$1/;
+ $v =~ s/_.+$//;
+ if ( ref($v) ) {
+ $v = $v + 0; # Numify
+ }
+ return $v;
+}
+
+
+
+
+
+######################################################################
+# MYMETA.yml Support
+
+sub WriteMyMeta {
+ $_[0]->write_mymeta;
+}
+
+sub write_mymeta {
+ my $self = shift;
+
+ # If there's no existing META.yml there is nothing we can do
+ return unless -f 'META.yml';
+
+ # Merge the perl version into the dependencies
+ my $val = $self->Meta->{values};
+ my $perl = delete $val->{perl_version};
+ if ( $perl ) {
+ $val->{requires} ||= [];
+ my $requires = $val->{requires};
+
+ # Canonize to three-dot version after Perl 5.6
+ if ( $perl >= 5.006 ) {
+ $perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e
+ }
+ unshift @$requires, [ perl => $perl ];
+ }
+
+ # Load the advisory META.yml file
+ require YAML::Tiny;
+ my @yaml = YAML::Tiny::LoadFile('META.yml');
+ my $meta = $yaml[0];
+
+ # Overwrite the non-configure dependency hashs
+ delete $meta->{requires};
+ delete $meta->{build_requires};
+ delete $meta->{recommends};
+ if ( exists $val->{requires} ) {
+ $meta->{requires} = { map { @$_ } @{ $val->{requires} } };
+ }
+ if ( exists $val->{build_requires} ) {
+ $meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
+ }
+
+ # Save as the MYMETA.yml file
+ YAML::Tiny::DumpFile('MYMETA.yml', $meta);
}
1;
Modified: branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Win32.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/Win32.pm Wed Feb 18 14:17:50 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.77';
+ $VERSION = '0.79';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/With.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/With.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/With.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/With.pm Wed Feb 18 14:17:50 2009
@@ -8,7 +8,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.77';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/WriteAll.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/inc/Module/Install/WriteAll.pm Wed Feb 18 14:17:50 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.77';
+ $VERSION = '0.79';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/liborlite-migrate-perl/current/lib/ORLite/Migrate.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-migrate-perl/current/lib/ORLite/Migrate.pm?rev=30846&op=diff
==============================================================================
--- branches/upstream/liborlite-migrate-perl/current/lib/ORLite/Migrate.pm (original)
+++ branches/upstream/liborlite-migrate-perl/current/lib/ORLite/Migrate.pm Wed Feb 18 14:17:50 2009
@@ -11,7 +11,7 @@
use vars qw{$VERSION @ISA};
BEGIN {
- $VERSION = '0.01';
+ $VERSION = '0.02';
@ISA = 'ORLite';
}
@@ -35,9 +35,7 @@
} else {
Carp::croak("Missing, empty or invalid params HASH");
}
- unless ( defined $params{create} ) {
- $params{create} = 0;
- }
+ $params{create} = $params{create} ? 1 : 0;
unless (
defined _STRING($params{file})
and (
@@ -71,6 +69,14 @@
# Get the schema version
my $file = File::Spec->rel2abs($params{file});
+ my $created = ! -f $params{file};
+ if ( $created ) {
+ # Create the parent directory
+ my $dir = File::Basename::dirname($file);
+ unless ( -d $dir ) {
+ File::Path::mkpath( $dir, { verbose => 0 } );
+ }
+ }
my $dsn = "dbi:SQLite:$file";
my $dbh = DBI->connect($dsn);
my $version = $dbh->selectrow_arrayref('pragma user_version')->[0];
@@ -280,7 +286,7 @@
=head1 COPYRIGHT
-Copyright 2008 Adam Kennedy.
+Copyright 2009 Adam Kennedy.
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
More information about the Pkg-perl-cvs-commits
mailing list