r44923 - in /trunk/liborlite-migrate-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/ORLite/ lib/ORLite/Migrate/ t/ t/lib/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sun Sep 27 16:25:26 UTC 2009
Author: jawnsy-guest
Date: Sun Sep 27 16:25:19 2009
New Revision: 44923
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44923
Log:
* New upstream release
* Standards-Version 3.8.3 (no changes)
* Added myself to Uploaders and Copyright
* Drop version dependencies where made unnecessary
* Rewrote control description
* Update copyright information
* Update to new short debhelper rules format
Modified:
trunk/liborlite-migrate-perl/Changes
trunk/liborlite-migrate-perl/META.yml
trunk/liborlite-migrate-perl/Makefile.PL
trunk/liborlite-migrate-perl/debian/changelog
trunk/liborlite-migrate-perl/debian/control
trunk/liborlite-migrate-perl/debian/copyright
trunk/liborlite-migrate-perl/debian/rules
trunk/liborlite-migrate-perl/inc/Module/Install.pm
trunk/liborlite-migrate-perl/inc/Module/Install/Base.pm
trunk/liborlite-migrate-perl/inc/Module/Install/Can.pm
trunk/liborlite-migrate-perl/inc/Module/Install/DSL.pm
trunk/liborlite-migrate-perl/inc/Module/Install/Fetch.pm
trunk/liborlite-migrate-perl/inc/Module/Install/Makefile.pm
trunk/liborlite-migrate-perl/inc/Module/Install/Metadata.pm
trunk/liborlite-migrate-perl/inc/Module/Install/Win32.pm
trunk/liborlite-migrate-perl/inc/Module/Install/WriteAll.pm
trunk/liborlite-migrate-perl/lib/ORLite/Migrate.pm
trunk/liborlite-migrate-perl/lib/ORLite/Migrate/Patch.pm
trunk/liborlite-migrate-perl/t/01_compile.t
trunk/liborlite-migrate-perl/t/02_main.t
trunk/liborlite-migrate-perl/t/03_trivial.t
trunk/liborlite-migrate-perl/t/lib/Test.pm
Modified: trunk/liborlite-migrate-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/Changes?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/Changes (original)
+++ trunk/liborlite-migrate-perl/Changes Sun Sep 27 16:25:19 2009
@@ -1,4 +1,13 @@
Changes for Perl extension ORLite-Migrate
+
+1.05 Sat 26 Sep 2009
+ - Some additional tweaks to the prune support
+
+1.04 Sat 26 Sep 2009
+ - Upgrade to Module::Install::DSL 0.91
+ - Added missing prereq for Params::Util 0.37
+ - Adding support for ORLite's prune feature
+ - Test scripts now run with prune enabled
0.03 Sun 19 Apr 2009
- Updating to Module::Install::DSL 0.83
Modified: trunk/liborlite-migrate-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/META.yml?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/META.yml (original)
+++ trunk/liborlite-migrate-perl/META.yml Sun Sep 27 16:25:19 2009
@@ -8,7 +8,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 0.85'
+generated_by: 'Module::Install version 0.91'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -26,7 +26,7 @@
File::Spec: 3.2701
File::pushd: 1.00
IPC::Run3: 0.042
- ORLite: 1.20
+ ORLite: 1.28
Params::Util: 0.37
Probe::Perl: 0.01
perl: 5.6.0
@@ -34,4 +34,4 @@
ChangeLog: http://fisheye2.atlassian.com/changelog/cpan/trunk/ORLite-Migrate
license: http://dev.perl.org/licenses/
repository: http://svn.ali.as/cpan/trunk/ORLite-Migrate
-version: 0.03
+version: 1.05
Modified: trunk/liborlite-migrate-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/Makefile.PL?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/Makefile.PL (original)
+++ trunk/liborlite-migrate-perl/Makefile.PL Sun Sep 27 16:25:19 2009
@@ -1,8 +1,9 @@
-use inc::Module::Install::DSL 0.83;
+use inc::Module::Install::DSL 0.91;
all_from lib/ORLite/Migrate.pm
requires_from lib/ORLite/Migrate.pm
-requires File::pushd 1.00
-requires IPC::Run3 0.042
-requires Probe::Perl 0.01
-test_requires Test::More 0.47
+requires File::pushd 1.00
+requires IPC::Run3 0.042
+requires Probe::Perl 0.01
+requires Params::Util 0.37
+test_requires Test::More 0.47
Modified: trunk/liborlite-migrate-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/debian/changelog?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/debian/changelog (original)
+++ trunk/liborlite-migrate-perl/debian/changelog Sun Sep 27 16:25:19 2009
@@ -1,4 +1,13 @@
-liborlite-migrate-perl (0.03-3) UNRELEASED; urgency=low
+liborlite-migrate-perl (1.05-1) UNRELEASED; urgency=low
+
+ [ Jonathan Yu ]
+ * New upstream release
+ * Standards-Version 3.8.3 (no changes)
+ * Added myself to Uploaders and Copyright
+ * Drop version dependencies where made unnecessary
+ * Rewrote control description
+ * Update copyright information
+ * Update to new short debhelper rules format
[ Nathan Handler ]
* debian/watch: Update to ignore development releases.
@@ -8,7 +17,7 @@
perl (>= 5.6.0-{12,16}) with an unversioned dependency on perl (as
permitted by Debian Policy 3.8.3).
- -- Nathan Handler <nhandler at ubuntu.com> Sat, 06 Jun 2009 01:36:48 +0000
+ -- Jonathan Yu <jawnsy at cpan.org> Sun, 27 Sep 2009 08:32:02 -0400
liborlite-migrate-perl (0.03-2) unstable; urgency=high
Modified: trunk/liborlite-migrate-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/debian/control?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/debian/control (original)
+++ trunk/liborlite-migrate-perl/debian/control Sun Sep 27 16:25:19 2009
@@ -1,18 +1,17 @@
Source: liborlite-migrate-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7)
+Build-Depends: debhelper (>= 7.0.50)
Build-Depends-Indep: libdbd-sqlite3-perl (>= 1.21), libdbi-perl (>= 1.58),
- libipc-run3-perl (>= 0.042), liborlite-perl (>= 1.20),
- libparams-util-perl (>= 0.37), libprobe-perl-perl (>= 0.01),
- perl, libfile-pushd-perl (>= 1.00), libtest-cpan-meta-perl,
+ libipc-run3-perl (>= 0.042), liborlite-perl, libparams-util-perl (>= 0.37),
+ libprobe-perl-perl, libfile-pushd-perl, libtest-cpan-meta-perl, perl,
libtest-pod-perl, libpod-simple-perl (>= 3.07), libtest-minimumversion-perl,
- libfile-spec-perl (>= 3.2701)
+ libfile-spec-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Damyan Ivanov <dmn at debian.org>,
+Uploaders: Damyan Ivanov <dmn at debian.org>, Jonathan Yu <jawnsy at cpan.org>,
Brian Cassidy <brian.cassidy at gmail.com>,
gregor herrmann <gregoa at debian.org>
-Standards-Version: 3.8.1
+Standards-Version: 3.8.3
Homepage: http://search.cpan.org/dist/ORLite-Migrate/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/liborlite-migrate-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/liborlite-migrate-perl/
@@ -20,19 +19,11 @@
Package: liborlite-migrate-perl
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}, libdbd-sqlite3-perl (>= 1.21),
- libdbi-perl (>= 1.58), libipc-run3-perl (>= 0.042), liborlite-perl (>= 1.20),
- libparams-util-perl (>= 0.37), libprobe-perl-perl (>= 0.01),
- libfile-pushd-perl (>= 1.00), libfile-spec-perl (>= 3.2701)
-Description: extremely light weight SQLite-specific schema migration
+ libdbi-perl (>= 1.58), libipc-run3-perl (>= 0.042), liborlite-perl,
+ libparams-util-perl (>= 0.37), libprobe-perl-perl, libfile-pushd-perl,
+ libfile-spec-perl
+Description: Perl helper module for SQLite-to-ORLite schema migration
ORLite::Migrate is a light weight Database Schema Migration enhancement for
- ORLite.
- .
- It provides a simple implementation of schema versioning within the SQLite
- database using the built-in user_version pragma (which is set to zero by
+ ORLite. It provides a simple implementation of schema versioning within the
+ SQLite database using the built-in user_version pragma (which is set to zero by
default).
- .
- ORLite is a light weight single class Object-Relational Mapper (ORM) system
- specifically designed for (and limited to only) work with SQLite.
- .
- SQLite is a light weight single file SQL database that provides an excellent
- platform for embedded storage of structured data.
Modified: trunk/liborlite-migrate-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/debian/copyright?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/debian/copyright (original)
+++ trunk/liborlite-migrate-perl/debian/copyright Sun Sep 27 16:25:19 2009
@@ -5,23 +5,21 @@
Upstream-Name: ORLite-Migrate
Files: *
-Copyright: Copyright 2009 Adam Kennedy <adamk at cpan.org>
+Copyright: 2009, Adam Kennedy <adamk at cpan.org>
License-Alias: Perl
License: Artistic | GPL-1+
- This program is free software; you can redistribute it and/or modify it under
- the same terms as Perl itself.
-Files: inc/*
-Copyright: Copyright 2002 - 2009 by Brian Ingerson, Audrey Tang and Adam Kennedy
-License: GPL-1+ | Artistic
- This program is free software; you can redistribute it and/or modify it under
- the same terms as Perl itself.
+Files: inc/Module/*
+Copyright: 2002-2009, Adam Kennedy <adamk at cpan.org>
+ 2002-2009, Audrey Tang <autrijus at autrijus.org>
+ 2002-2009, Brian Ingerson <ingy at cpan.org>
+License-Alias: Perl
+License: Artistic | GPL-1+
Files: debian/*
Copyright: 2009, Damyan Ivanov <dmn at debian.org>
+ 2009, Jonathan Yu <jawnsy at cpan.org>
License: Artistic | GPL-1+
- Packaging is free software; you can redistribute it and/or modify it under the
- same terms as Perl itself.
License: Artistic
This program is free software; you can redistribute it and/or modify
Modified: trunk/liborlite-migrate-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/debian/rules?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/debian/rules (original)
+++ trunk/liborlite-migrate-perl/debian/rules Sun Sep 27 16:25:19 2009
@@ -1,23 +1,7 @@
#!/usr/bin/make -f
-build: build-stamp
-build-stamp:
- AUTOMATED_TESTING=1 dh build
- touch $@
-
-clean:
+%:
dh $@
-install: install-stamp
-install-stamp: build-stamp
- dh install
- touch $@
-
-binary-arch:
-
-binary-indep: install
- dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build
+override_dh_auto_test:
+ AUTOMATED_TESTING=1 dh_auto_test
Modified: trunk/liborlite-migrate-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/inc/Module/Install.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/inc/Module/Install.pm (original)
+++ trunk/liborlite-migrate-perl/inc/Module/Install.pm Sun Sep 27 16:25:19 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.85';
+ $VERSION = '0.91';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -353,7 +353,7 @@
if ( $] >= 5.006 ) {
open( FH, '<', $_[0] ) or die "open($_[0]): $!";
} else {
- open( FH, "< $_[0]" ) or die "open($_[0]): $!";
+ open( FH, "< $_[0]" ) or die "open($_[0]): $!";
}
my $string = do { local $/; <FH> };
close FH or die "close($_[0]): $!";
@@ -384,7 +384,7 @@
if ( $] >= 5.006 ) {
open( FH, '>', $_[0] ) or die "open($_[0]): $!";
} else {
- open( FH, "> $_[0]" ) or die "open($_[0]): $!";
+ open( FH, "> $_[0]" ) or die "open($_[0]): $!";
}
foreach ( 1 .. $#_ ) {
print FH $_[$_] or die "print($_[0]): $!";
Modified: trunk/liborlite-migrate-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/inc/Module/Install/Base.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/inc/Module/Install/Base.pm (original)
+++ trunk/liborlite-migrate-perl/inc/Module/Install/Base.pm Sun Sep 27 16:25:19 2009
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '0.85';
+ $VERSION = '0.91';
}
# Suspend handler for "redefined" warnings
@@ -13,42 +13,34 @@
$SIG{__WARN__} = sub { $w };
}
-### This is the ONLY module that shouldn't have strict on
-# use strict;
-
-#line 45
+#line 42
sub new {
- my ($class, %args) = @_;
-
- foreach my $method ( qw(call load) ) {
- next if defined &{"$class\::$method"};
- *{"$class\::$method"} = sub {
- shift()->_top->$method(@_);
- };
+ my $class = shift;
+ unless ( defined &{"${class}::call"} ) {
+ *{"${class}::call"} = sub { shift->_top->call(@_) };
}
-
- bless( \%args, $class );
+ unless ( defined &{"${class}::load"} ) {
+ *{"${class}::load"} = sub { shift->_top->load(@_) };
+ }
+ bless { @_ }, $class;
}
-#line 66
+#line 61
sub AUTOLOAD {
- my $self = shift;
local $@;
- my $autoload = eval {
- $self->_top->autoload
- } or return;
- goto &$autoload;
+ my $func = eval { shift->_top->autoload } or return;
+ goto &$func;
}
-#line 83
+#line 75
sub _top {
$_[0]->{_top};
}
-#line 98
+#line 90
sub admin {
$_[0]->_top->{admin}
@@ -56,7 +48,7 @@
Module::Install::Base::FakeAdmin->new;
}
-#line 114
+#line 106
sub is_admin {
$_[0]->admin->VERSION;
@@ -83,4 +75,4 @@
1;
-#line 162
+#line 154
Modified: trunk/liborlite-migrate-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/inc/Module/Install/Can.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/inc/Module/Install/Can.pm (original)
+++ trunk/liborlite-migrate-perl/inc/Module/Install/Can.pm Sun Sep 27 16:25:19 2009
@@ -2,16 +2,16 @@
package Module::Install::Can;
use strict;
-use Module::Install::Base;
-use Config ();
-use File::Spec ();
-use ExtUtils::MakeMaker ();
+use Config ();
+use File::Spec ();
+use ExtUtils::MakeMaker ();
+use Module::Install::Base ();
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.85';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
# check if we can load some module
Modified: trunk/liborlite-migrate-perl/inc/Module/Install/DSL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/inc/Module/Install/DSL.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/inc/Module/Install/DSL.pm (original)
+++ trunk/liborlite-migrate-perl/inc/Module/Install/DSL.pm Sun Sep 27 16:25:19 2009
@@ -4,14 +4,11 @@
use strict;
use vars qw{$VERSION $ISCORE};
BEGIN {
- $VERSION = '0.85';
+ $VERSION = '0.91';
$ISCORE = 1;
*inc::Module::Install::DSL::VERSION = *VERSION;
@inc::Module::Install::DSL::ISA = __PACKAGE__;
}
-
-# Load the main Module::Install as usual.
-# require Module::Install;
sub import {
# Read in the rest of the Makefile.PL
Modified: trunk/liborlite-migrate-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/inc/Module/Install/Fetch.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/liborlite-migrate-perl/inc/Module/Install/Fetch.pm Sun Sep 27 16:25:19 2009
@@ -2,13 +2,13 @@
package Module::Install::Fetch;
use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.85';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub get_file {
Modified: trunk/liborlite-migrate-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/inc/Module/Install/Makefile.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/liborlite-migrate-perl/inc/Module/Install/Makefile.pm Sun Sep 27 16:25:19 2009
@@ -2,14 +2,14 @@
package Module::Install::Makefile;
use strict 'vars';
-use Module::Install::Base;
-use ExtUtils::MakeMaker ();
-
-use vars qw{$VERSION $ISCORE @ISA};
+use ExtUtils::MakeMaker ();
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.85';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub Makefile { $_[0] }
Modified: trunk/liborlite-migrate-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/inc/Module/Install/Metadata.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/liborlite-migrate-perl/inc/Module/Install/Metadata.pm Sun Sep 27 16:25:19 2009
@@ -2,18 +2,17 @@
package Module::Install::Metadata;
use strict 'vars';
-use Module::Install::Base;
+use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.85';
- @ISA = qw{Module::Install::Base};
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
}
my @boolean_keys = qw{
sign
- mymeta
};
my @scalar_keys = qw{
@@ -440,21 +439,21 @@
/ixms ) {
my $license_text = $1;
my @phrases = (
- 'under the same (?:terms|license) as perl itself' => 'perl', 1,
- 'GNU general public license' => 'gpl', 1,
- 'GNU public license' => 'gpl', 1,
- 'GNU lesser general public license' => 'lgpl', 1,
- 'GNU lesser public license' => 'lgpl', 1,
- 'GNU library general public license' => 'lgpl', 1,
- 'GNU library public license' => 'lgpl', 1,
- 'BSD license' => 'bsd', 1,
- 'Artistic license' => 'artistic', 1,
- 'GPL' => 'gpl', 1,
- 'LGPL' => 'lgpl', 1,
- 'BSD' => 'bsd', 1,
- 'Artistic' => 'artistic', 1,
- 'MIT' => 'mit', 1,
- 'proprietary' => 'proprietary', 0,
+ 'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
+ 'GNU general public license' => 'gpl', 1,
+ 'GNU public license' => 'gpl', 1,
+ 'GNU lesser general public license' => 'lgpl', 1,
+ 'GNU lesser public license' => 'lgpl', 1,
+ 'GNU library general public license' => 'lgpl', 1,
+ 'GNU library public license' => 'lgpl', 1,
+ 'BSD license' => 'bsd', 1,
+ 'Artistic license' => 'artistic', 1,
+ 'GPL' => 'gpl', 1,
+ 'LGPL' => 'lgpl', 1,
+ 'BSD' => 'bsd', 1,
+ 'Artistic' => 'artistic', 1,
+ 'MIT' => 'mit', 1,
+ 'proprietary' => 'proprietary', 0,
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
@@ -506,17 +505,29 @@
}
}
+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)
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?)$/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
+ # Numify
+ $v = $v + 0;
}
return $v;
}
@@ -526,21 +537,56 @@
######################################################################
-# MYMETA.yml Support
+# MYMETA Support
sub WriteMyMeta {
die "WriteMyMeta has been deprecated";
}
-sub write_mymeta {
- my $self = shift;
-
- # If there's no existing META.yml there is nothing we can do
- return unless -f 'META.yml';
+sub write_mymeta_yaml {
+ my $self = shift;
# We need YAML::Tiny to write the MYMETA.yml file
unless ( eval { require YAML::Tiny; 1; } ) {
return 1;
+ }
+
+ # Generate the data
+ my $meta = $self->_write_mymeta_data or return 1;
+
+ # Save as the MYMETA.yml file
+ print "Writing MYMETA.yml\n";
+ YAML::Tiny::DumpFile('MYMETA.yml', $meta);
+}
+
+sub write_mymeta_json {
+ my $self = shift;
+
+ # We need JSON to write the MYMETA.json file
+ unless ( eval { require JSON; 1; } ) {
+ return 1;
+ }
+
+ # Generate the data
+ my $meta = $self->_write_mymeta_data or return 1;
+
+ # Save as the MYMETA.yml file
+ print "Writing MYMETA.json\n";
+ Module::Install::_write(
+ 'MYMETA.json',
+ JSON->new->pretty(1)->canonical->encode($meta),
+ );
+}
+
+sub _write_mymeta_data {
+ my $self = shift;
+
+ # If there's no existing META.yml there is nothing we can do
+ return undef unless -f 'META.yml';
+
+ # We need Parse::CPAN::Meta to load the file
+ unless ( eval { require Parse::CPAN::Meta; 1; } ) {
+ return undef;
}
# Merge the perl version into the dependencies
@@ -558,7 +604,7 @@
}
# Load the advisory META.yml file
- my @yaml = YAML::Tiny::LoadFile('META.yml');
+ my @yaml = Parse::CPAN::Meta::LoadFile('META.yml');
my $meta = $yaml[0];
# Overwrite the non-configure dependency hashs
@@ -572,9 +618,7 @@
$meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
}
- # Save as the MYMETA.yml file
- print "Writing MYMETA.yml\n";
- YAML::Tiny::DumpFile('MYMETA.yml', $meta);
+ return $meta;
}
1;
Modified: trunk/liborlite-migrate-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/inc/Module/Install/Win32.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/liborlite-migrate-perl/inc/Module/Install/Win32.pm Sun Sep 27 16:25:19 2009
@@ -2,12 +2,12 @@
package Module::Install::Win32;
use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.85';
- @ISA = qw{Module::Install::Base};
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: trunk/liborlite-migrate-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/inc/Module/Install/WriteAll.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/liborlite-migrate-perl/inc/Module/Install/WriteAll.pm Sun Sep 27 16:25:19 2009
@@ -2,11 +2,11 @@
package Module::Install::WriteAll;
use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.85';
+ $VERSION = '0.91';;
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
@@ -41,8 +41,18 @@
# The Makefile write process adds a couple of dependencies,
# so write the META.yml files after the Makefile.
- $self->Meta->write if $args{meta};
- $self->Meta->write_mymeta if $self->mymeta;
+ if ( $args{meta} ) {
+ $self->Meta->write;
+ }
+
+ # Experimental support for MYMETA
+ if ( $ENV{X_MYMETA} ) {
+ if ( $ENV{X_MYMETA} eq 'JSON' ) {
+ $self->Meta->write_mymeta_json;
+ } else {
+ $self->Meta->write_mymeta_yaml;
+ }
+ }
return 1;
}
Modified: trunk/liborlite-migrate-perl/lib/ORLite/Migrate.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/lib/ORLite/Migrate.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/lib/ORLite/Migrate.pm (original)
+++ trunk/liborlite-migrate-perl/lib/ORLite/Migrate.pm Sun Sep 27 16:25:19 2009
@@ -11,11 +11,11 @@
use Params::Util 0.37 qw{ _STRING _CLASS _HASH };
use DBI 1.58 ();
use DBD::SQLite 1.21 ();
-use ORLite 1.20 ();
+use ORLite 1.28 ();
use vars qw{$VERSION @ISA};
BEGIN {
- $VERSION = '0.03';
+ $VERSION = '1.05';
@ISA = 'ORLite';
}
@@ -78,23 +78,32 @@
# Create the parent directory
my $dir = File::Basename::dirname($file);
unless ( -d $dir ) {
- File::Path::mkpath( $dir, { verbose => 0 } );
+ my @dirs = File::Path::mkpath( $dir, { verbose => 0 } );
+ $class->prune(@dirs) if $params{prune};
}
+ $class->prune($file) if $params{prune};
}
my $dsn = "dbi:SQLite:$file";
my $dbh = DBI->connect($dsn);
my $version = $dbh->selectrow_arrayref('pragma user_version')->[0];
$dbh->disconnect;
+ # We're done with the prune setting now
+ $params{prune} = 0;
+
# Build the migration plan
my $timeline = File::Spec->rel2abs($params{timeline});
- my @plan = plan( $params{timeline}, $version );
+ my @plan = plan( $params{timeline}, $version );
# Execute the migration plan
if ( @plan ) {
# Does the migration plan reach the required destination
my $destination = $version + scalar(@plan);
- if ( exists $params{user_version} and $destination != $params{user_version} ) {
+ if (
+ exists $params{user_version}
+ and
+ $destination != $params{user_version}
+ ) {
die "Schema migration destination user_version mismatch (got $destination, wanted $params{user_version})";
}
@@ -124,7 +133,10 @@
}
# Hand off to the regular constructor
- return $class->SUPER::import( \%params, $DEBUG ? '-DEBUG' : () );
+ $class->SUPER::import(
+ \%params,
+ $DEBUG ? '-DEBUG' : ()
+ );
}
@@ -243,8 +255,8 @@
migration scripts.
These patch scripts are named in the form F<migrate-$version.pl>, where
-C<$version> is the schema version to migrate to. A typical timeline directory
-will look something like the following.
+C<$version> is the schema version to migrate to. A typical timeline
+directory will look something like the following.
migrate-01.pl
migrate-02.pl
Modified: trunk/liborlite-migrate-perl/lib/ORLite/Migrate/Patch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/lib/ORLite/Migrate/Patch.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/lib/ORLite/Migrate/Patch.pm (original)
+++ trunk/liborlite-migrate-perl/lib/ORLite/Migrate/Patch.pm Sun Sep 27 16:25:19 2009
@@ -11,7 +11,7 @@
use vars qw{$VERSION @ISA @EXPORT $FILE};
BEGIN {
- $VERSION = '0.03';
+ $VERSION = '1.05';
@ISA = 'Exporter';
@EXPORT = qw{
file
@@ -33,7 +33,7 @@
}
sub file {
- unless ($FILE) {
+ unless ( $FILE ) {
# The filename is passed on STDIN
$FILE = <STDIN>;
chomp($FILE);
Modified: trunk/liborlite-migrate-perl/t/01_compile.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/t/01_compile.t?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/t/01_compile.t (original)
+++ trunk/liborlite-migrate-perl/t/01_compile.t Sun Sep 27 16:25:19 2009
@@ -6,8 +6,6 @@
$^W = 1;
}
-use Test::More tests => 2;
-
-ok( $] >= 5.006, 'Perl version is new enough' );
+use Test::More tests => 1;
require_ok( 'ORLite::Migrate' );
Modified: trunk/liborlite-migrate-perl/t/02_main.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/t/02_main.t?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/t/02_main.t (original)
+++ trunk/liborlite-migrate-perl/t/02_main.t Sun Sep 27 16:25:19 2009
@@ -42,6 +42,7 @@
file => '$file',
create => 1,
tables => 0,
+ prune => 1,
};
1;
Modified: trunk/liborlite-migrate-perl/t/03_trivial.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/t/03_trivial.t?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/t/03_trivial.t (original)
+++ trunk/liborlite-migrate-perl/t/03_trivial.t Sun Sep 27 16:25:19 2009
@@ -26,6 +26,7 @@
file => '$file',
timeline => '$timeline',
user_version => 3,
+ prune => 1,
};
1;
Modified: trunk/liborlite-migrate-perl/t/lib/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liborlite-migrate-perl/t/lib/Test.pm?rev=44923&op=diff
==============================================================================
--- trunk/liborlite-migrate-perl/t/lib/Test.pm (original)
+++ trunk/liborlite-migrate-perl/t/lib/Test.pm Sun Sep 27 16:25:19 2009
@@ -9,8 +9,8 @@
use vars qw{$VERSION @ISA @EXPORT};
BEGIN {
- $VERSION = '0.03';
- @ISA = qw{ Exporter };
+ $VERSION = '1.05';
+ @ISA = 'Exporter';
@EXPORT = qw{ test_db connect_ok create_ok };
}
More information about the Pkg-perl-cvs-commits
mailing list