r46118 - in /branches/upstream/libconfig-jfdi-perl/current: ./ inc/Module/ inc/Module/Install/ lib/Config/ t/ t/9bug/ t/assets/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Tue Oct 20 17:02:48 UTC 2009
Author: jawnsy-guest
Date: Tue Oct 20 17:01:56 2009
New Revision: 46118
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46118
Log:
[svn-upgrade] Integrating new upstream version, libconfig-jfdi-perl (0.064)
Added:
branches/upstream/libconfig-jfdi-perl/current/MANIFEST.SKIP
branches/upstream/libconfig-jfdi-perl/current/t/Test.pm
branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute-path-to.pl
Removed:
branches/upstream/libconfig-jfdi-perl/current/t/00-load.t
Modified:
branches/upstream/libconfig-jfdi-perl/current/Changes
branches/upstream/libconfig-jfdi-perl/current/MANIFEST
branches/upstream/libconfig-jfdi-perl/current/META.yml
branches/upstream/libconfig-jfdi-perl/current/README
branches/upstream/libconfig-jfdi-perl/current/inc/Module/AutoInstall.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/AutoInstall.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Base.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Can.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Fetch.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Include.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Win32.pm
branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/WriteAll.pm
branches/upstream/libconfig-jfdi-perl/current/lib/Config/JFDI.pm
branches/upstream/libconfig-jfdi-perl/current/t/12-loader-file.t
branches/upstream/libconfig-jfdi-perl/current/t/18-open.t
branches/upstream/libconfig-jfdi-perl/current/t/20-substitute.t
branches/upstream/libconfig-jfdi-perl/current/t/9bug/taking-extension-from-path.t
branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute.pl
Modified: branches/upstream/libconfig-jfdi-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/Changes?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/Changes (original)
+++ branches/upstream/libconfig-jfdi-perl/current/Changes Tue Oct 20 17:01:56 2009
@@ -1,5 +1,17 @@
TODO:
- What if: Config::JFDI->new() # $name is undefined?
+
+0.064 Sunday October 18 21:33:52 PDT 2009:
+ - Non-development release
+
+0.063_3 Friday October 16 00:51:31 PDT 2009:
+ - Merged _2 & _1 with 0.063
+
+0.063_2 Thursday October 15 13:30:27 PDT 2009
+ - Added mechanism to quiet deprecation warnings in a non-author environment
+
+0.063_1 Wednesday October 14 11:32:06 PDT 2009
+ - Fixed broken __path_to__ substitution (rt50490)
0.063 Tuesday June 23 11:10:15 PDT 2009:
- Fixed undefined warning (thanks kmx rt47237)
Modified: branches/upstream/libconfig-jfdi-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/MANIFEST?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/MANIFEST (original)
+++ branches/upstream/libconfig-jfdi-perl/current/MANIFEST Tue Oct 20 17:01:56 2009
@@ -1,5 +1,6 @@
Changes
MANIFEST
+MANIFEST.SKIP
META.yml # Will be created by "make dist"
Makefile.PL
README
@@ -17,7 +18,6 @@
inc/Module/AutoInstall.pm
inc/Module/Install/AutoInstall.pm
inc/Module/Install/Include.pm
-t/00-load.t
t/10-loader.t
t/11-loader-env.t
t/12-loader-file.t
@@ -30,6 +30,9 @@
t/20-substitute.t
t/21-path-to.t
t/22-default.t
+t/9bug/rt47237-path-undefined.t
+t/9bug/taking-extension-from-path.t
+t/Test.pm
t/assets/default.pl
t/assets/order/xyzzy.cnf
t/assets/order/xyzzy.conf
@@ -42,10 +45,9 @@
t/assets/path_to.pl
t/assets/some_random_file.pl
t/assets/substitute.pl
+t/assets/substitute-path-to.pl
t/assets/xyzzy.pl
t/assets/xyzzy_catalyst.pl
t/assets/xyzzy_local.pl
-t/9bug/taking-extension-from-path.t
-t/9bug/rt47237-path-undefined.t
t/assets/dotdot.conf
t/assets/dir.cnf/.keep
Added: branches/upstream/libconfig-jfdi-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/MANIFEST.SKIP?rev=46118&op=file
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/MANIFEST.SKIP (added)
+++ branches/upstream/libconfig-jfdi-perl/current/MANIFEST.SKIP Tue Oct 20 17:01:56 2009
@@ -1,0 +1,1 @@
+.git/
Modified: branches/upstream/libconfig-jfdi-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/META.yml?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/META.yml (original)
+++ branches/upstream/libconfig-jfdi-perl/current/META.yml Tue Oct 20 17:01:56 2009
@@ -9,7 +9,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 0.87'
+generated_by: 'Module::Install version 0.91'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -34,4 +34,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://github.com/robertkrimen/config-jfdi/tree/master
-version: 0.063
+version: 0.064
Modified: branches/upstream/libconfig-jfdi-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/README?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/README (original)
+++ branches/upstream/libconfig-jfdi-perl/current/README Tue Oct 20 17:01:56 2009
@@ -3,7 +3,7 @@
layer over Config::Any
VERSION
- Version 0.063
+ Version 0.064
SYNPOSIS
use Config::JFDI;
Modified: branches/upstream/libconfig-jfdi-perl/current/inc/Module/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/AutoInstall.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/AutoInstall.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/AutoInstall.pm Tue Oct 20 17:01:56 2009
@@ -175,15 +175,24 @@
}
# XXX: check for conflicts and uninstalls(!) them.
- if (
- defined( my $cur = _version_check( _load($mod), $arg ||= 0 ) ) )
+ my $cur = _load($mod);
+ if (_version_cmp ($cur, $arg) >= 0)
{
print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
push @Existing, $mod => $arg;
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
else {
- print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+ if (not defined $cur) # indeed missing
+ {
+ print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+ }
+ else
+ {
+ # no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above
+ print "too old. ($cur < $arg)\n";
+ }
+
push @required, $mod => $arg;
}
}
@@ -268,8 +277,11 @@
require CPAN;
- if ($CPAN::VERSION > '1.89' && $cpan_env) {
- return _running_under('CPAN');
+ if ($CPAN::VERSION > '1.89') {
+ if ($cpan_env) {
+ return _running_under('CPAN');
+ }
+ return; # CPAN.pm new enough, don't need to check further
}
# last ditch attempt, this -will- configure CPAN, very sorry
@@ -310,7 +322,7 @@
while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) {
# grep out those already installed
- if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+ if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
push @installed, $pkg;
}
else {
@@ -349,7 +361,7 @@
# see if we have successfully installed them
while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
- if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+ if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
push @installed, $pkg;
}
elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) {
@@ -404,7 +416,7 @@
my $success;
my $obj = $modtree->{$pkg};
- if ( $obj and defined( _version_check( $obj->{version}, $ver ) ) ) {
+ if ( $obj and _version_cmp( $obj->{version}, $ver ) >= 0 ) {
my $pathname = $pkg;
$pathname =~ s/::/\\W/;
@@ -497,7 +509,7 @@
my $obj = CPAN::Shell->expand( Module => $pkg );
my $success = 0;
- if ( $obj and defined( _version_check( $obj->cpan_version, $ver ) ) ) {
+ if ( $obj and _version_cmp( $obj->cpan_version, $ver ) >= 0 ) {
my $pathname = $pkg;
$pathname =~ s/::/\\W/;
@@ -561,7 +573,7 @@
my $ver = shift;
return
- if defined( _version_check( _load($class), $ver ) ); # no need to upgrade
+ if _version_cmp( _load($class), $ver ) >= 0; # no need to upgrade
if (
_prompt( "==> A newer version of $class ($ver) is required. Install?",
@@ -658,7 +670,7 @@
# Load CPAN.pm and it's configuration
sub _load_cpan {
- return if $CPAN::VERSION and not @_;
+ return if $CPAN::VERSION and $CPAN::Config and not @_;
require CPAN;
if ( $CPAN::HandleConfig::VERSION ) {
# Newer versions of CPAN have a HandleConfig module
@@ -670,9 +682,11 @@
}
# compare two versions, either use Sort::Versions or plain comparison
-sub _version_check {
+# return values same as <=>
+sub _version_cmp {
my ( $cur, $min ) = @_;
- return unless defined $cur;
+ return -1 unless defined $cur; # if 0 keep comparing
+ return 1 unless $min;
$cur =~ s/\s+$//;
@@ -683,16 +697,13 @@
) {
# use version.pm if it is installed.
- return (
- ( version->new($cur) >= version->new($min) ) ? $cur : undef );
+ return version->new($cur) <=> version->new($min);
}
elsif ( $Sort::Versions::VERSION or defined( _load('Sort::Versions') ) )
{
# use Sort::Versions as the sorting algorithm for a.b.c versions
- return ( ( Sort::Versions::versioncmp( $cur, $min ) != -1 )
- ? $cur
- : undef );
+ return Sort::Versions::versioncmp( $cur, $min );
}
warn "Cannot reliably compare non-decimal formatted versions.\n"
@@ -701,7 +712,7 @@
# plain comparison
local $^W = 0; # shuts off 'not numeric' bugs
- return ( $cur >= $min ? $cur : undef );
+ return $cur <=> $min;
}
# nothing; this usage is deprecated.
@@ -791,4 +802,4 @@
__END__
-#line 1045
+#line 1056
Modified: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install.pm Tue Oct 20 17:01:56 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.87';
+ $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: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/AutoInstall.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/AutoInstall.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/AutoInstall.pm Tue Oct 20 17:01:56 2009
@@ -2,13 +2,13 @@
package Module::Install::AutoInstall;
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.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub AutoInstall { $_[0] }
Modified: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Base.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Base.pm Tue Oct 20 17:01:56 2009
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '0.87';
+ $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: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Can.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Can.pm Tue Oct 20 17:01:56 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.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
# check if we can load some module
Modified: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Fetch.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Fetch.pm Tue Oct 20 17:01:56 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.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub get_file {
Modified: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Include.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Include.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Include.pm Tue Oct 20 17:01:56 2009
@@ -2,13 +2,13 @@
package Module::Install::Include;
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.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub include {
Modified: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Makefile.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Makefile.pm Tue Oct 20 17:01:56 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.87';
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
- @ISA = qw{Module::Install::Base};
}
sub Makefile { $_[0] }
Modified: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Metadata.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Metadata.pm Tue Oct 20 17:01:56 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.87';
- @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: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Win32.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/Win32.pm Tue Oct 20 17:01:56 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.87';
- @ISA = qw{Module::Install::Base};
+ $VERSION = '0.91';
+ @ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/WriteAll.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/inc/Module/Install/WriteAll.pm Tue Oct 20 17:01:56 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.87';
+ $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: branches/upstream/libconfig-jfdi-perl/current/lib/Config/JFDI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/lib/Config/JFDI.pm?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/lib/Config/JFDI.pm (original)
+++ branches/upstream/libconfig-jfdi-perl/current/lib/Config/JFDI.pm Tue Oct 20 17:01:56 2009
@@ -9,11 +9,11 @@
=head1 VERSION
-Version 0.063
-
-=cut
-
-our $VERSION = '0.063';
+Version 0.064
+
+=cut
+
+our $VERSION = '0.064';
=head1 SYNPOSIS
@@ -133,7 +133,7 @@
sub _build_path_to {
my $self = shift;
return $self->config->{home} if $self->config->{home};
- return $self->{path} if defined $self->{path} && -d $self->{path};
+ return $self->source->path unless $self->source->path_is_file;
return '.';
}
Modified: branches/upstream/libconfig-jfdi-perl/current/t/12-loader-file.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/t/12-loader-file.t?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/t/12-loader-file.t (original)
+++ branches/upstream/libconfig-jfdi-perl/current/t/12-loader-file.t Tue Oct 20 17:01:56 2009
@@ -6,13 +6,17 @@
plan qw/no_plan/;
use Config::JFDI;
+use t::Test;
sub has_Config_General {
return eval "require Config::General;";
}
{
- my $config = Config::JFDI->new(file => "t/assets/some_random_file.pl");
+ my $config = Config::JFDI->new(
+ t::Test->deprecation_flag,
+ file => "t/assets/some_random_file.pl"
+ );
ok($config->get);
is($config->get->{'Controller::Foo'}->{foo}, 'bar');
@@ -36,20 +40,28 @@
test => 'paths ending with ../',
} );
- $config = Config::JFDI->new( path => "t/assets/order/xyzzy.cnf" );
+ $config = Config::JFDI->new(
+ path => "t/assets/order/xyzzy.cnf"
+ );
cmp_deeply( $config->get, {
cnf => 1,
last => 'local_cnf',
local_cnf => 1,
} );
- $config = Config::JFDI->new( file => "t/assets/order/xyzzy.cnf" );
+ $config = Config::JFDI->new(
+ t::Test->deprecation_flag,
+ file => "t/assets/order/xyzzy.cnf"
+ );
cmp_deeply( $config->get, {
cnf => 1,
last => 'cnf',
} );
- $config = Config::JFDI->new( path => "t/assets/order/xyzzy.cnf", no_local => 1 );
+ $config = Config::JFDI->new(
+ path => "t/assets/order/xyzzy.cnf",
+ no_local => 1
+ );
cmp_deeply( $config->get, {
cnf => 1,
last => 'cnf',
@@ -62,7 +74,10 @@
warning_is { $config = Config::JFDI->new( file => "t/assets/order/xyzzy.cnf", quiet_deprecation => 1 ) } '';
- $config = Config::JFDI->new( file => "t/assets/file-does-not-exist.cnf" );
+ $config = Config::JFDI->new(
+ t::Test->deprecation_flag,
+ file => "t/assets/file-does-not-exist.cnf"
+ );
cmp_deeply( $config->get, {
} );
}
Modified: branches/upstream/libconfig-jfdi-perl/current/t/18-open.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/t/18-open.t?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/t/18-open.t (original)
+++ branches/upstream/libconfig-jfdi-perl/current/t/18-open.t Tue Oct 20 17:01:56 2009
@@ -6,6 +6,7 @@
plan qw/no_plan/;
use Config::JFDI;
+use t::Test;
sub has_Config_General {
return eval "require Config::General;";
@@ -29,7 +30,10 @@
}
{
- my $config = Config::JFDI->new( file => 't/assets/some_random_file.pl' );
+ my $config = Config::JFDI->new(
+ t::Test->deprecation_flag,
+ file => 't/assets/some_random_file.pl'
+ );
warning_like { $config->open( '...' ) } qr/You called ->open on an instantiated object with arguments/;
}
Modified: branches/upstream/libconfig-jfdi-perl/current/t/20-substitute.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/t/20-substitute.t?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/t/20-substitute.t (original)
+++ branches/upstream/libconfig-jfdi-perl/current/t/20-substitute.t Tue Oct 20 17:01:56 2009
@@ -7,22 +7,34 @@
use Path::Class;
use Config::JFDI;
-my $config = Config::JFDI->new(
- qw{ name substitute path t/assets },
- substitute => {
- literal => sub {
- return "Literally, $_[1]!";
+{
+ my $config = Config::JFDI->new(
+ qw{ name substitute path t/assets },
+ substitute => {
+ literal => sub {
+ return "Literally, $_[1]!";
+ },
+ two_plus_two => sub {
+ return 2 + 2;
+ },
},
- two_plus_two => sub {
- return 2 + 2;
- },
- },
-);
+ );
+ ok( $config->get );
-ok($config->get);
+ #is( $config->get->{default}, dir( 'a-galaxy-far-far-away/' ) );
+ is( $config->get->{default}, file( 'a-galaxy-far-far-away', '' ) ); # Not dir because path_to treats a non-existent directory as a file
+ is( $config->get->{default_override}, "Literally, this!" );
+ is( $config->get->{original}, 4 );
+ is( $config->get->{original_embed}, "2 + 2 = 4" );
+}
-#is($config->get->{default}, dir('a-galaxy-far-far-away/'));
-is($config->get->{default}, file('a-galaxy-far-far-away', '')); # Not dir because path_to treats a non-existent directory as a file
-is($config->get->{default_override}, "Literally, this!");
-is($config->get->{original}, 4);
-is($config->get->{original_embed}, "2 + 2 = 4");
+{
+ my $path = dir(qw/ t assets /)->absolute;
+ my $config = Config::JFDI->new(
+ qw{ name substitute-path-to }, path => "$path",
+ );
+ ok( $config->get );
+
+ is( $config->get->{default}, "$path" );
+ is( $config->get->{template}, $path->file( 'root/template' ) );
+}
Modified: branches/upstream/libconfig-jfdi-perl/current/t/9bug/taking-extension-from-path.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/t/9bug/taking-extension-from-path.t?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/t/9bug/taking-extension-from-path.t (original)
+++ branches/upstream/libconfig-jfdi-perl/current/t/9bug/taking-extension-from-path.t Tue Oct 20 17:01:56 2009
@@ -1,10 +1,7 @@
-#!/usr/bin/env perl
-
use strict;
use warnings;
use Test::More;
-
plan qw/no_plan/;
use Config::JFDI::Source::Loader;
Added: branches/upstream/libconfig-jfdi-perl/current/t/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/t/Test.pm?rev=46118&op=file
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/t/Test.pm (added)
+++ branches/upstream/libconfig-jfdi-perl/current/t/Test.pm Tue Oct 20 17:01:56 2009
@@ -1,0 +1,11 @@
+package t::Test;
+
+use strict;
+use warnings;
+
+sub deprecation_flag {
+ # Probably won't work on win32 :)
+ return ! $ENV{TEST_NO_AUTHOR} && -e 'inc/.author' ? () : (quiet_deprecation => 1);
+}
+
+1;
Added: branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute-path-to.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute-path-to.pl?rev=46118&op=file
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute-path-to.pl (added)
+++ branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute-path-to.pl Tue Oct 20 17:01:56 2009
@@ -1,0 +1,5 @@
+{
+ default => '__HOME__',
+ template => '__path_to(root/template)__',
+}
+
Modified: branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute.pl?rev=46118&op=diff
==============================================================================
--- branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute.pl (original)
+++ branches/upstream/libconfig-jfdi-perl/current/t/assets/substitute.pl Tue Oct 20 17:01:56 2009
@@ -4,4 +4,5 @@
default_override => '__literal(this)__',
original => '__two_plus_two__',
original_embed => '2 + 2 = __two_plus_two__',
+ template => '__path_to(root/template)__',
}
More information about the Pkg-perl-cvs-commits
mailing list