r28382 - in /branches/upstream/libmodule-load-conditional-perl/current: CHANGES META.yml lib/Module/Load/Conditional.pm t/01_Module_Load_Conditional.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Dec 18 20:44:29 UTC 2008
Author: gregoa
Date: Thu Dec 18 20:44:26 2008
New Revision: 28382
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28382
Log:
[svn-upgrade] Integrating new upstream version, libmodule-load-conditional-perl (0.28)
Modified:
branches/upstream/libmodule-load-conditional-perl/current/CHANGES
branches/upstream/libmodule-load-conditional-perl/current/META.yml
branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm
branches/upstream/libmodule-load-conditional-perl/current/t/01_Module_Load_Conditional.t
Modified: branches/upstream/libmodule-load-conditional-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-load-conditional-perl/current/CHANGES?rev=28382&op=diff
==============================================================================
--- branches/upstream/libmodule-load-conditional-perl/current/CHANGES (original)
+++ branches/upstream/libmodule-load-conditional-perl/current/CHANGES Thu Dec 18 20:44:26 2008
@@ -1,3 +1,8 @@
+Changes for 0.28 Wed Dec 17 13:54:17 CET 2008
+=================================================
+* Add the directory the package was found in to the
+ return value of check_install()
+
Changes for 0.26 Fri Feb 29 16:01:15 CET 2008
=================================================
* Address #32817: $INC{'Module/Load/Conditional.pm'}
Modified: branches/upstream/libmodule-load-conditional-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-load-conditional-perl/current/META.yml?rev=28382&op=diff
==============================================================================
--- branches/upstream/libmodule-load-conditional-perl/current/META.yml (original)
+++ branches/upstream/libmodule-load-conditional-perl/current/META.yml Thu Dec 18 20:44:26 2008
@@ -1,15 +1,24 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Module-Load-Conditional
-version: 0.26
-version_from: lib/Module/Load/Conditional.pm
-installdirs: site
+--- #YAML:1.0
+name: Module-Load-Conditional
+version: 0.28
+abstract: Looking up module information / loading at runtime
+author:
+ - Jos Boumans <kane[at]cpan.org>
+license: unknown
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
requires:
- Locale::Maketext::Simple: 0
- Module::Load: 0.11
- Params::Check: 0
- Test::More: 0
- version: 0.69
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30
+ Locale::Maketext::Simple: 0
+ Module::Load: 0.11
+ Params::Check: 0
+ Test::More: 0
+ version: 0.69
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.48
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm?rev=28382&op=diff
==============================================================================
--- branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm (original)
+++ branches/upstream/libmodule-load-conditional-perl/current/lib/Module/Load/Conditional.pm Thu Dec 18 20:44:26 2008
@@ -18,7 +18,7 @@
$FIND_VERSION $ERROR $CHECK_INC_HASH];
use Exporter;
@ISA = qw[Exporter];
- $VERSION = '0.26';
+ $VERSION = '0.28';
$VERBOSE = 0;
$FIND_VERSION = 1;
$CHECK_INC_HASH = 0;
@@ -115,6 +115,11 @@
=item file
Full path to the file that contains the module
+
+=item dir
+
+Directory, or more exact the C<@INC> entry, where the module was
+loaded from.
=item version
@@ -226,6 +231,9 @@
}
}
+ ### store the directory we found the file in
+ $href->{dir} = $dir;
+
### files need to be in unix format under vms,
### or they might be loaded twice
$href->{file} = ON_VMS
@@ -236,18 +244,20 @@
if( $FIND_VERSION ) {
my $in_pod = 0;
- while (local $_ = <$fh> ) {
+ while ( my $line = <$fh> ) {
### stolen from EU::MM_Unix->parse_version to address
### #24062: "Problem with CPANPLUS 0.076 misidentifying
### versions after installing Text::NSP 1.03" where a
### VERSION mentioned in the POD was found before
### the real $VERSION declaration.
- $in_pod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $in_pod;
+ $in_pod = $line =~ /^=(?!cut)/ ? 1 :
+ $line =~ /^=cut/ ? 0 :
+ $in_pod;
next if $in_pod;
### try to find a version declaration in this string.
- my $ver = __PACKAGE__->_parse_version( $_ );
+ my $ver = __PACKAGE__->_parse_version( $line );
if( defined $ver ) {
$href->{version} = $ver;
Modified: branches/upstream/libmodule-load-conditional-perl/current/t/01_Module_Load_Conditional.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-load-conditional-perl/current/t/01_Module_Load_Conditional.t?rev=28382&op=diff
==============================================================================
--- branches/upstream/libmodule-load-conditional-perl/current/t/01_Module_Load_Conditional.t (original)
+++ branches/upstream/libmodule-load-conditional-perl/current/t/01_Module_Load_Conditional.t Thu Dec 18 20:44:26 2008
@@ -20,8 +20,8 @@
use constant ON_VMS => $^O eq 'VMS';
-use lib "$FindBin::Bin/../lib";
-use lib "$FindBin::Bin/to_load";
+use lib File::Spec->catdir($FindBin::Bin, qw[.. lib] );
+use lib File::Spec->catdir($FindBin::Bin, q[to_load] );
use_ok( 'Module::Load::Conditional' );
@@ -46,6 +46,12 @@
ok( $rv->{uptodate}, q[Verify self] );
is( $rv->{version}, $Module::Load::Conditional::VERSION,
q[ Found proper version] );
+ ok( $rv->{dir}, q[ Found directory information] );
+
+ { my $dir_re = qr/^$rv->{dir}/i;
+ like( $rv->{file}, $dir_re,
+ q[ Dir subset of file path] );
+ }
### break up the specification
my @rv_path = do {
@@ -73,6 +79,8 @@
File::Spec::Unix->catfile(@rv_path),
q[ Found proper file]
);
+
+
}
More information about the Pkg-perl-cvs-commits
mailing list