r51766 - in /branches/upstream/liborlite-mirror-perl/current: ./ inc/Module/ inc/Module/Install/ lib/ORLite/ t/ t/lib/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Jan 29 22:21:47 UTC 2010
Author: gregoa
Date: Fri Jan 29 22:21:40 2010
New Revision: 51766
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=51766
Log:
[svn-upgrade] Integrating new upstream version, liborlite-mirror-perl (1.20)
Added:
branches/upstream/liborlite-mirror-perl/current/t/08_array.t
Modified:
branches/upstream/liborlite-mirror-perl/current/Changes
branches/upstream/liborlite-mirror-perl/current/MANIFEST
branches/upstream/liborlite-mirror-perl/current/META.yml
branches/upstream/liborlite-mirror-perl/current/Makefile.PL
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Base.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Can.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/DSL.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Fetch.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Share.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Win32.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/With.pm
branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/WriteAll.pm
branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm
branches/upstream/liborlite-mirror-perl/current/t/02_basics.t
branches/upstream/liborlite-mirror-perl/current/t/03_gzip.t
branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t
branches/upstream/liborlite-mirror-perl/current/t/05_stub.t
branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t
branches/upstream/liborlite-mirror-perl/current/t/07_badfile.t
branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm
Modified: branches/upstream/liborlite-mirror-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/Changes?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/Changes (original)
+++ branches/upstream/liborlite-mirror-perl/current/Changes Fri Jan 29 22:21:40 2010
@@ -1,4 +1,12 @@
Changes for Perl extension ORLite-Mirror
+
+1.20 Thu 28 Jan 2010
+ - Switching to use array => 1 by default for all ORLite::Mirror
+ classes (most notably the ORDB:: family will get faster)
+
+1.19 Thu 28 Jan 2010
+ - Upgrading ORLite dependency to 1.37 to get array support.
+ - Changed the "no transactions" test from begin to commit
1.18 Sat 2 Jan 2010
- Upgrading ORLite dependency to 1.30 to get improved startup
Modified: branches/upstream/liborlite-mirror-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/MANIFEST?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/MANIFEST (original)
+++ branches/upstream/liborlite-mirror-perl/current/MANIFEST Fri Jan 29 22:21:40 2010
@@ -26,6 +26,7 @@
t/05_stub.t
t/06_stubgz.t
t/07_badfile.t
+t/08_array.t
t/97_meta.t
t/98_pod.t
t/99_pmv.t
Modified: branches/upstream/liborlite-mirror-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/META.yml?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/META.yml (original)
+++ branches/upstream/liborlite-mirror-perl/current/META.yml Fri Jan 29 22:21:40 2010
@@ -11,7 +11,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 0.91'
+generated_by: 'Module::Install version 0.92'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -34,11 +34,11 @@
IO::Uncompress::Gunzip: 2.008
LWP::Online: 1.07
LWP::UserAgent: 5.806
- ORLite: 1.30
+ ORLite: 1.37
Params::Util: 0.33
perl: 5.6.0
resources:
ChangeLog: http://fisheye2.atlassian.com/changelog/cpan/trunk/ORLite-Mirror
license: http://dev.perl.org/licenses/
repository: http://svn.ali.as/cpan/trunk/ORLite-Mirror
-version: 1.18
+version: 1.20
Modified: branches/upstream/liborlite-mirror-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/Makefile.PL?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/Makefile.PL (original)
+++ branches/upstream/liborlite-mirror-perl/current/Makefile.PL Fri Jan 29 22:21:40 2010
@@ -1,4 +1,4 @@
-use inc::Module::Install::DSL 0.91;
+use inc::Module::Install::DSL 0.92;
all_from lib/ORLite/Mirror.pm
requires_from lib/ORLite/Mirror.pm
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install.pm Fri Jan 29 22:21:40 2010
@@ -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.91';
+ $VERSION = '0.92';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -348,17 +348,24 @@
return $call;
}
+# Done in evals to avoid confusing Perl::MinimumVersion
+eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _read {
local *FH;
- 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]): $!";
return $string;
}
+END_NEW
+sub _read {
+ local *FH;
+ open( FH, "< $_[0]" ) or die "open($_[0]): $!";
+ my $string = do { local $/; <FH> };
+ close FH or die "close($_[0]): $!";
+ return $string;
+}
+END_OLD
sub _readperl {
my $string = Module::Install::_read($_[0]);
@@ -379,18 +386,26 @@
return $string;
}
+# Done in evals to avoid confusing Perl::MinimumVersion
+eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _write {
local *FH;
- 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]): $!";
}
close FH or die "close($_[0]): $!";
}
+END_NEW
+sub _write {
+ local *FH;
+ open( FH, "> $_[0]" ) or die "open($_[0]): $!";
+ foreach ( 1 .. $#_ ) {
+ print FH $_[$_] or die "print($_[0]): $!";
+ }
+ close FH or die "close($_[0]): $!";
+}
+END_OLD
# _version is for processing module versions (eg, 1.03_05) not
# Perl versions (eg, 5.8.1).
@@ -427,4 +442,4 @@
1;
-# Copyright 2008 - 2009 Adam Kennedy.
+# Copyright 2008 - 2010 Adam Kennedy.
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Base.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Base.pm Fri Jan 29 22:21:40 2010
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.92';
}
# Suspend handler for "redefined" warnings
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Can.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Can.pm Fri Jan 29 22:21:40 2010
@@ -9,7 +9,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.92';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/DSL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/DSL.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/DSL.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/DSL.pm Fri Jan 29 22:21:40 2010
@@ -4,7 +4,7 @@
use strict;
use vars qw{$VERSION $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.92';
$ISCORE = 1;
*inc::Module::Install::DSL::VERSION = *VERSION;
@inc::Module::Install::DSL::ISA = __PACKAGE__;
@@ -45,7 +45,7 @@
# Execute the script
eval $code;
- print STDERR "Failed to execute the generated code" if $@;
+ print STDERR "Failed to execute the generated code...\n$@" if $@;
exit(0);
}
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Fetch.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Fetch.pm Fri Jan 29 22:21:40 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.92';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Makefile.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Makefile.pm Fri Jan 29 22:21:40 2010
@@ -7,7 +7,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.92';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -34,6 +34,17 @@
}
}
+# Store a cleaned up version of the MakeMaker version,
+# since we need to behave differently in a variety of
+# ways based on the MM version.
+my $makemaker = eval $ExtUtils::MakeMaker::VERSION;
+
+# If we are passed a param, do a "newer than" comparison.
+# Otherwise, just return the MakeMaker version.
+sub makemaker {
+ ( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0
+}
+
sub makemaker_args {
my $self = shift;
my $args = ( $self->{makemaker_args} ||= {} );
@@ -44,7 +55,7 @@
# For mm args that take multiple space-seperated args,
# append an argument to the current list.
sub makemaker_append {
- my $self = sShift;
+ my $self = shift;
my $name = shift;
my $args = $self->makemaker_args;
$args->{name} = defined $args->{$name}
@@ -130,12 +141,13 @@
# an underscore, even though its own version may contain one!
# Hence the funny regexp to get rid of it. See RT #35800
# for details.
- $self->build_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
- $self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+ my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
+ $self->build_requires( 'ExtUtils::MakeMaker' => $v );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
} else {
# Allow legacy-compatibility with 5.005 by depending on the
# most recent EU:MM that supported 5.005.
- $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
$self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
}
@@ -152,42 +164,62 @@
$args->{ABSTRACT} = $self->abstract;
$args->{AUTHOR} = $self->author;
}
- if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
+ if ( $self->makemaker(6.10) ) {
$args->{NO_META} = 1;
}
- if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+ if ( $self->makemaker(6.17) and $self->sign ) {
$args->{SIGN} = 1;
}
unless ( $self->is_admin ) {
delete $args->{SIGN};
}
- # Merge both kinds of requires into prereq_pm
my $prereq = ($args->{PREREQ_PM} ||= {});
%$prereq = ( %$prereq,
- map { @$_ }
+ map { @$_ } # flatten [module => version]
map { @$_ }
grep $_,
- ($self->configure_requires, $self->build_requires, $self->requires)
+ ($self->requires)
);
# Remove any reference to perl, PREREQ_PM doesn't support it
delete $args->{PREREQ_PM}->{perl};
- # merge both kinds of requires into prereq_pm
+ # Merge both kinds of requires into BUILD_REQUIRES
+ my $build_prereq = ($args->{BUILD_REQUIRES} ||= {});
+ %$build_prereq = ( %$build_prereq,
+ map { @$_ } # flatten [module => version]
+ map { @$_ }
+ grep $_,
+ ($self->configure_requires, $self->build_requires)
+ );
+
+ # Remove any reference to perl, BUILD_REQUIRES doesn't support it
+ delete $args->{BUILD_REQUIRES}->{perl};
+
+ # Delete bundled dists from prereq_pm
my $subdirs = ($args->{DIR} ||= []);
if ($self->bundles) {
foreach my $bundle (@{ $self->bundles }) {
my ($file, $dir) = @$bundle;
push @$subdirs, $dir if -d $dir;
- delete $prereq->{$file};
+ delete $build_prereq->{$file}; #Delete from build prereqs only
}
+ }
+
+ unless ( $self->makemaker('6.55_03') ) {
+ %$prereq = (%$prereq,%$build_prereq);
+ delete $args->{BUILD_REQUIRES};
}
if ( my $perl_version = $self->perl_version ) {
eval "use $perl_version; 1"
or die "ERROR: perl: Version $] is installed, "
. "but we need version >= $perl_version";
+
+ if ( $self->makemaker(6.48) ) {
+ $args->{MIN_PERL_VERSION} = $perl_version;
+ }
}
$args->{INSTALLDIRS} = $self->installdirs;
@@ -265,4 +297,4 @@
__END__
-#line 394
+#line 426
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Metadata.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Metadata.pm Fri Jan 29 22:21:40 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.92';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -230,6 +230,8 @@
die("The path '$file' does not exist, or is not a file");
}
+ $self->{values}{all_from} = $file;
+
# Some methods pull from POD instead of code.
# If there is a matching .pod, use that instead
my $pod = $file;
@@ -385,11 +387,10 @@
}
}
-sub perl_version_from {
- my $self = shift;
+sub _extract_perl_version {
if (
- Module::Install::_read($_[0]) =~ m/
- ^
+ $_[0] =~ m/
+ ^\s*
(?:use|require) \s*
v?
([\d_\.]+)
@@ -398,6 +399,16 @@
) {
my $perl_version = $1;
$perl_version =~ s{_}{}g;
+ return $perl_version;
+ } else {
+ return;
+ }
+}
+
+sub perl_version_from {
+ my $self = shift;
+ my $perl_version=_extract_perl_version(Module::Install::_read($_[0]));
+ if ($perl_version) {
$self->perl_version($perl_version);
} else {
warn "Cannot determine perl version info from $_[0]\n";
@@ -425,13 +436,12 @@
}
}
-sub license_from {
- my $self = shift;
+sub _extract_license {
if (
- Module::Install::_read($_[0]) =~ m/
+ $_[0] =~ m/
(
=head \d \s+
- (?:licen[cs]e|licensing|copyright|legal)\b
+ (?:licen[cs]e|licensing|copyrights?|legal)\b
.*?
)
(=head\\d.*|=cut.*|)
@@ -439,7 +449,8 @@
/ixms ) {
my $license_text = $1;
my @phrases = (
- 'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
+ 'under the same (?:terms|license) as (?:perl|the perl programming language)' => 'perl', 1,
+ 'under the terms of (?: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,
@@ -456,20 +467,32 @@
'proprietary' => 'proprietary', 0,
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
- $pattern =~ s{\s+}{\\s+}g;
+ $pattern =~ s#\s+#\\s+#gs;
if ( $license_text =~ /\b$pattern\b/i ) {
- $self->license($license);
- return 1;
+ return $license;
}
}
- }
-
- warn "Cannot determine license info from $_[0]\n";
- return 'unknown';
+ } else {
+ return;
+ }
+}
+
+sub license_from {
+ my $self = shift;
+ if (my $license=_extract_license(Module::Install::_read($_[0]))) {
+ $self->license($license);
+ } else {
+ warn "Cannot determine license info from $_[0]\n";
+ return 'unknown';
+ }
}
sub _extract_bugtracker {
- my @links = $_[0] =~ m#L<(\Qhttp://rt.cpan.org/\E[^>]+)>#g;
+ my @links = $_[0] =~ m#L<(
+ \Qhttp://rt.cpan.org/\E[^>]+|
+ \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
+ \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+ )>#gx;
my %links;
@links{@links}=();
@links=keys %links;
@@ -485,7 +508,7 @@
return 0;
}
if ( @links > 1 ) {
- warn "Found more than on rt.cpan.org link in $_[0]\n";
+ warn "Found more than one bugtracker link in $_[0]\n";
return 0;
}
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Share.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Share.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Share.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Share.pm Fri Jan 29 22:21:40 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.92';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Win32.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/Win32.pm Fri Jan 29 22:21:40 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.92';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/With.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/With.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/With.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/With.pm Fri Jan 29 22:21:40 2010
@@ -8,7 +8,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.92';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/WriteAll.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/inc/Module/Install/WriteAll.pm Fri Jan 29 22:21:40 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';;
+ $VERSION = '0.92';;
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/lib/ORLite/Mirror.pm Fri Jan 29 22:21:40 2010
@@ -14,11 +14,11 @@
use IO::Uncompress::Bunzip2 2.008 ();
use LWP::UserAgent 5.806 ();
use LWP::Online 1.07 ();
-use ORLite 1.30 ();
+use ORLite 1.37 ();
use vars qw{$VERSION @ISA};
BEGIN {
- $VERSION = '1.18';
+ $VERSION = '1.20';
@ISA = 'ORLite';
}
@@ -68,6 +68,11 @@
# Normalise boolean settings
my $show_progress = $params{show_progress} ? 1 : 0;
+
+ # Use array-based objects by default, they are smaller and faster
+ unless ( defined $params{array} ) {
+ $params{array} = 1;
+ }
# Find the maximum age for the local database copy
my $maxage = delete $params{maxage};
Modified: branches/upstream/liborlite-mirror-perl/current/t/02_basics.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/02_basics.t?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/02_basics.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/02_basics.t Fri Jan 29 22:21:40 2010
@@ -43,6 +43,7 @@
index => [ 'table_one.col2' ],
user_version => 7,
prune => 1,
+ array => 0,
};
1;
@@ -50,7 +51,7 @@
END_PERL
ok( ORLite::Mirror::Test->can('dbh'), 'Created database methods' );
-ok( ! ORLite::Mirror::Test->can('begin'), 'Did not create transaction methods' );
+ok( ! ORLite::Mirror::Test->can('commit'), 'Did not create transaction methods' );
is( ORLite::Mirror::Test->pragma('user_version'), 7, '->user_version ok' );
# Check the ->count method
Modified: branches/upstream/liborlite-mirror-perl/current/t/03_gzip.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/03_gzip.t?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/03_gzip.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/03_gzip.t Fri Jan 29 22:21:40 2010
@@ -47,6 +47,7 @@
maxage => 1,
index => [ 'table_one.col2' ],
prune => 1,
+ array => 0,
};
1;
@@ -54,7 +55,7 @@
END_PERL
ok( ORLite::Mirror::Test->can('dbh'), 'Created database methods' );
-ok( ! ORLite::Mirror::Test->can('begin'), 'Did not create transaction methods' );
+ok( ! ORLite::Mirror::Test->can('commit'), 'Did not create transaction methods' );
# Check the ->count method
is( ORLite::Mirror::Test::TableOne->count, 3, 'Found 3 rows' );
Modified: branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/04_bzip2.t Fri Jan 29 22:21:40 2010
@@ -46,6 +46,7 @@
use ORLite::Mirror {
url => '$uri',
prune => 1,
+ array => 0,
};
1;
@@ -53,7 +54,7 @@
END_PERL
ok( ORLite::Mirror::Test->can('dbh'), 'Created database methods' );
-ok( ! ORLite::Mirror::Test->can('begin'), 'Did not create transaction methods' );
+ok( ! ORLite::Mirror::Test->can('commit'), 'Did not create transaction methods' );
# Check the ->count method
is( ORLite::Mirror::Test::TableOne->count, 3, 'Found 3 rows' );
Modified: branches/upstream/liborlite-mirror-perl/current/t/05_stub.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/05_stub.t?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/05_stub.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/05_stub.t Fri Jan 29 22:21:40 2010
@@ -44,6 +44,7 @@
update => 'connect',
user_version => 7,
prune => 1,
+ array => 0,
};
1;
Modified: branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/06_stubgz.t Fri Jan 29 22:21:40 2010
@@ -49,6 +49,7 @@
update => 'connect',
user_version => 7,
prune => 1,
+ array => 0,
};
1;
Modified: branches/upstream/liborlite-mirror-perl/current/t/07_badfile.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/07_badfile.t?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/07_badfile.t (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/07_badfile.t Fri Jan 29 22:21:40 2010
@@ -51,6 +51,7 @@
use ORLite::Mirror {
url => '$broken_url',
prune => 1,
+ array => 0,
};
1;
Added: branches/upstream/liborlite-mirror-perl/current/t/08_array.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/08_array.t?rev=51766&op=file
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/08_array.t (added)
+++ branches/upstream/liborlite-mirror-perl/current/t/08_array.t Fri Jan 29 22:21:40 2010
@@ -1,0 +1,95 @@
+#!/usr/bin/perl
+
+# Tests the basic functionality of SQLite.
+
+use strict;
+
+BEGIN {
+ $| = 1;
+ $^W = 1;
+}
+
+use Test::More tests => 28;
+use File::Spec::Functions ':ALL';
+use File::Remove 'clear';
+use Params::Util ();
+use URI::file ();
+use t::lib::Test;
+
+# Flush any existing mirror database file
+clear(mirror_db('ORLite::Mirror::Test'));
+
+# Set up the file
+my $file = test_db();
+my $dbh = create_ok(
+ catfile(qw{ t 02_basics.sql }),
+ "dbi:SQLite:$file",
+);
+
+# Convert the file into a URI
+my $url = URI::file->new_abs($file)->as_string;
+
+# Create the test package
+eval <<"END_PERL"; die $@ if $@;
+package ORLite::Mirror::Test;
+
+use strict;
+use vars qw{\$VERSION};
+BEGIN {
+ \$VERSION = '1.00';
+}
+use ORLite::Mirror {
+ url => '$url',
+ maxage => 1,
+ index => [ 'table_one.col2' ],
+ user_version => 7,
+ prune => 1,
+};
+
+1;
+
+END_PERL
+
+ok( ORLite::Mirror::Test->can('dbh'), 'Created database methods' );
+ok( ! ORLite::Mirror::Test->can('commit'), 'Did not create transaction methods' );
+is( ORLite::Mirror::Test->pragma('user_version'), 7, '->user_version ok' );
+
+# Check the ->count method
+is( ORLite::Mirror::Test::TableOne->count, 3, 'Found 3 rows' );
+is( ORLite::Mirror::Test::TableOne->count('where col2 = ?', 'bar'), 2, 'Condition count works' );
+
+# Fetch the rows (list context)
+SCOPE: {
+ my @ones = ORLite::Mirror::Test::TableOne->select('order by col1');
+ is( scalar(@ones), 3, 'Got 3 objects' );
+ isa_ok( $ones[0], 'ORLite::Mirror::Test::TableOne' );
+ isa_ok( $ones[1], 'ORLite::Mirror::Test::TableOne' );
+ isa_ok( $ones[2], 'ORLite::Mirror::Test::TableOne' );
+ ok(
+ Params::Util::_ARRAYLIKE($ones[0]),
+ 'Default return type is an ARRAY',
+ );
+ is( $ones[0]->col1, 1, '->col1 ok' );
+ is( $ones[1]->col1, 2, '->col1 ok' );
+ is( $ones[2]->col1, 3, '->col1 ok' );
+ is( $ones[0]->col2, 'foo', '->col2 ok' );
+ is( $ones[1]->col2, 'bar', '->col2 ok' );
+ is( $ones[2]->col2, 'bar', '->col2 ok' );
+}
+
+# Fetch the rows (scalar context)
+SCOPE: {
+ my $ones = ORLite::Mirror::Test::TableOne->select('order by col1');
+ is( scalar(@$ones), 3, 'Got 3 objects' );
+ isa_ok( $ones->[0], 'ORLite::Mirror::Test::TableOne' );
+ isa_ok( $ones->[1], 'ORLite::Mirror::Test::TableOne' );
+ isa_ok( $ones->[2], 'ORLite::Mirror::Test::TableOne' );
+ is( $ones->[0]->col1, 1, '->col1 ok' );
+ is( $ones->[1]->col1, 2, '->col1 ok' );
+ is( $ones->[2]->col1, 3, '->col1 ok' );
+ is( $ones->[0]->col2, 'foo', '->col2 ok' );
+ is( $ones->[1]->col2, 'bar', '->col2 ok' );
+ is( $ones->[2]->col2, 'bar', '->col2 ok' );
+
+ ok( ! ORLite::Mirror::Test::TableOne->can('delete'), 'Did not add data manipulation methods' );
+}
Modified: branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm?rev=51766&op=diff
==============================================================================
--- branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm (original)
+++ branches/upstream/liborlite-mirror-perl/current/t/lib/Test.pm Fri Jan 29 22:21:40 2010
@@ -10,7 +10,7 @@
use vars qw{$VERSION @ISA @EXPORT};
BEGIN {
- $VERSION = '1.18';
+ $VERSION = '1.20';
@ISA = 'Exporter';
@EXPORT = qw{ test_db mirror_db connect_ok create_ok };
}
More information about the Pkg-perl-cvs-commits
mailing list