r46482 - in /branches/upstream/libfind-lib-perl/current: ./ lib/Find/ t/ t/moretests/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Wed Oct 28 14:14:30 UTC 2009
Author: jawnsy-guest
Date: Wed Oct 28 14:14:23 2009
New Revision: 46482
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46482
Log:
[svn-upgrade] Integrating new upstream version, libfind-lib-perl (1.0)
Added:
branches/upstream/libfind-lib-perl/current/t/01-basic.t
branches/upstream/libfind-lib-perl/current/t/moretests/05-backcompat.t
branches/upstream/libfind-lib-perl/current/t/moretests/06-conflict.t
Removed:
branches/upstream/libfind-lib-perl/current/t/01-addinc.t
branches/upstream/libfind-lib-perl/current/t/04-import.t
branches/upstream/libfind-lib-perl/current/t/05-complex.t
Modified:
branches/upstream/libfind-lib-perl/current/Changes
branches/upstream/libfind-lib-perl/current/MANIFEST
branches/upstream/libfind-lib-perl/current/META.yml
branches/upstream/libfind-lib-perl/current/lib/Find/Lib.pm
branches/upstream/libfind-lib-perl/current/t/02-use.t
branches/upstream/libfind-lib-perl/current/t/07-libs.t
branches/upstream/libfind-lib-perl/current/t/08-dupe-slashes.t
branches/upstream/libfind-lib-perl/current/t/moretests/01-relative.t
branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0-begin.t
branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0.t
branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-begin.t
branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-topbegin.t
branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir.t
branches/upstream/libfind-lib-perl/current/t/moretests/04-symlinks.t
branches/upstream/libfind-lib-perl/current/t/moretests/symlink_test.pl
Modified: branches/upstream/libfind-lib-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/Changes?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/Changes (original)
+++ branches/upstream/libfind-lib-perl/current/Changes Wed Oct 28 14:14:23 2009
@@ -1,4 +1,18 @@
Revision history for Find-Lib
+
+1.0 Tue Oct 27 13:40:00 PDT 2009
+ *** Incompatible changes see details in 0.99 releases below. ***
+ - Better diagnostics for some obscur test issues on obscur OSes
+
+0.99_02 Fri Oct 23 18:00:00 PDT 2009
+ - test change to try to make CPANTESTERS happy
+
+0.99_01 Thu Oct 22 14:00:00 PDT 2009
+ - Adds the shorter form "Find::Lib 'lib1', 'lib2', 'lib3';"
+ - Add convenience base(), catfile(), catdir() methods
+ *** INCOMPATIBLE CHANGES ***
+ - 'pkg' option is gone
+ - the list arguments won't do any 'use' anymore
0.06 Thu May 8 22:30:00 PDT 2009
- Still working on the test suite (I wish I could use cpantesters
Modified: branches/upstream/libfind-lib-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/MANIFEST?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/MANIFEST (original)
+++ branches/upstream/libfind-lib-perl/current/MANIFEST Wed Oct 28 14:14:23 2009
@@ -6,13 +6,12 @@
META.yml
README
t/00-compile.t
-t/01-addinc.t
+t/01-basic.t
t/02-use.t
t/03-missinginc.t
-t/04-import.t
-t/05-complex.t
t/06-empty.t
t/07-libs.t
+t/08-dupe-slashes.t
t/libs/Foo.pm
t/moretests/01-relative.t
t/moretests/02-dollar0-begin.t
@@ -20,12 +19,12 @@
t/moretests/03-chdir-begin.t
t/moretests/03-chdir-topbegin.t
t/moretests/03-chdir.t
-t/moretests/mytestlib/MyLib.pm
-t/mylib/MyLib.pm
-t/testutils.pl
-t/moretests/symlink_test.pl
-t/08-dupe-slashes.t
t/moretests/03-pwd-begin.t
t/moretests/04-symlinks.t
+t/moretests/05-backcompat.t
+t/moretests/06-conflict.t
+t/moretests/mytestlib/MyLib.pm
t/moretests/symlink_test.pl
+t/mylib/MyLib.pm
t/mylib/MyLibNoTest.pm
+t/testutils.pl
Modified: branches/upstream/libfind-lib-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/META.yml?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/META.yml (original)
+++ branches/upstream/libfind-lib-perl/current/META.yml Wed Oct 28 14:14:23 2009
@@ -1,12 +1,23 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Find-Lib
-version: 0.06
-version_from: lib/Find/Lib.pm
-installdirs: site
+--- #YAML:1.0
+name: Find-Lib
+version: 1.0
+abstract: Helper to smartly find libs to use in the filesystem tree
+author:
+ - Yann Kerherve <yannk at cpan.org>
+license: unknown
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
- File::Spec: 0
- Test::More: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30
+ File::Spec: 0
+ Test::More: 0
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.54
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libfind-lib-perl/current/lib/Find/Lib.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/lib/Find/Lib.pm?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/lib/Find/Lib.pm (original)
+++ branches/upstream/libfind-lib-perl/current/lib/Find/Lib.pm Wed Oct 28 14:14:23 2009
@@ -3,7 +3,7 @@
use warnings;
use lib;
-use File::Spec::Functions qw( catpath splitpath rel2abs catdir splitdir );
+use File::Spec::Functions qw( catpath splitpath rel2abs splitdir );
use vars qw/$Base $VERSION @base/;
use vars qw/$Script/; # compat
@@ -13,11 +13,11 @@
=head1 VERSION
-Version 0.02
-
-=cut
-
-$VERSION = '0.06';
+Version 1.0
+
+=cut
+
+$VERSION = '1.0';
=head1 SYNOPSIS
@@ -27,16 +27,19 @@
## simple usage
use Find::Lib '../mylib';
- ## with a Bootstap module
- use Find::Lib '../mylib' => 'My::Bootstrap';
-
- ## pass import parameters to your Bootstrap module
- use Find::Lib '../mylib' => 'My::Bootstrap', test => 1, dbi => 'sqlite';
-
- ## If you like verbose, or if you don't have a Bootstrap module
+ ## more libraries
+ use Find::Lib '../mylib', 'local-lib';
+
+ ## More verbose and backward compatible with Find::Lib < 1.0
use Find::Lib libs => [ 'lib', '../lib', 'devlib' ];
- use My::Test tests => 10;
- use My::Module;
+
+ ## resolve some path with minimum typing
+ $dir = Find::Lib->catdir("..", "data");
+ $path = Find::Lib->catfile("..", "data", "test.yaml");
+
+ $base = Find::Lib->base;
+ # or
+ $base = Find::Lib::Base;
=head1 DESCRIPTION
@@ -44,24 +47,33 @@
use FindBin;
use lib "$FindBin::Bin/../bootstrap/lib";
- use My::Bootstrap %param;
with something shorter. This is specially useful if your project has a lot
of scripts (For instance tests scripts).
- use Find::Lib '../bootstrap/lib' => 'My::Bootstrap', %param;
-
-does exactly that without using L<FindBin> module, and has the important
-propriety to do what you mean regarding symlinks and '..'.
-
-Note that the role of a Bootstrap module is actually to install more
-library paths in C<@INC> and to use more modules necessary to your application.
-It keeps your scripts nice and clean.
-
-On the other hand, if you don't want/need/have a Bootstrap module, you can
-still use L<Find::Lib> to automatically identify the relative locations of
-your libraries and add them to your C<@INC>; just use the expanded version
-as seen in the SYNOPSIS.
+ use Find::Lib '../bootstrap/lib';
+
+The important differences between L<FindBin> and L<Find::Lib> are:
+
+=over 4
+
+=item * symlinks and '..'
+
+If you have symlinks in your path it respects them, so basically you can forget
+you have symlinks, because Find::Lib will do the natural thing (NOT ignore
+them), and resolve '..' correctly. L<FindBin> breaks if you do:
+
+ use lib "$Bin/../lib";
+
+and you currently are in a symlinked directory, because $Bin resolved to the
+filesystem path (without the symlink) and not the shell path.
+
+=item * convenience
+
+it's faster too type, and more intuitive (Exporting C<$Bin> always
+felt weird to me).
+
+=back
=head1 DISCUSSION
@@ -95,26 +107,12 @@
=head2 import
-All the work is done in import. So you need to 'use Find::Lib' and pass
-arguments to it.
-
-Recognized arguments are:
-
-=over 4
-
-=item C<libs>, a reference to a list of path to add to C<@INC>. The paths given
-are (should) be relative to the location of the current script. The paths won't
-be added unless the path actually exists on disk
-
-=item C<pkgs>, a reference to a hash containing package name as keys and
-arrayref of arguments (to import) as values. This is not really useful in
-itself, you'd better specify 'libs' in the import arguments and then use
-on seperate lines after it.
-
-=back
-
-The short forms implies that the first argument passed to import is not C<libs>
-or C<pkgs>. An example of usage is given in the SYNOPSIS section.
+All the work is done in import. So you need to C<'use Find::Lib'> and pass
+a list of paths to add to @INC. See L<BACKWARD COMPATIBILITY> section for
+more retails on this topic.
+
+The paths given are (should) be relative to the location of the current script.
+The paths won't be added unless the path actually exists on disk
=cut
@@ -139,7 +137,7 @@
## a clean base is also important for the pop business below
#@base = grep { $_ && $_ ne '.' } shell_resolve(\@base, \@zero);
@base = shell_resolve(\@base, \@zero);
- return catpath( $volume, (catdir @base), '' );
+ return catpath( $volume, (File::Spec->catdir( @base )), '' );
}
## naive method, but really DWIM from a developer perspective
@@ -165,53 +163,92 @@
sub import {
my $class = shift;
return unless @_;
- my %param;
Carp::croak("The script/base dir cannot be found") unless -e $Base;
- if ( ( $_[0] eq 'libs' or $_[0] eq 'pkgs' )
- and ref $_[1] && ref $_[1] ne 'SCALAR' ) {
-
- %param = @_;
- }
- else {
- ## enters simple bootstrap mode:
- ## 'libpath' => 'bootstrap package' => @arguments
- $param{libs} = [ $_[0] ];
- if ( $_[1] ) {
- $param{pkgs} = { $_[1] => [ splice @_, 2 ] };
+ my @libs;
+
+ if ($_[0] eq 'libs') {
+ if ($_[1] && ref $_[1] && ref $_[1] eq 'ARRAY') {
+ ## backward compat mode;
+ @libs = @{ $_[1] };
}
}
-
- for ( reverse @{ $param{libs} || [] } ) {
+ @libs = @_ unless @libs;
+
+ for ( reverse @libs ) {
my @lib = splitdir $_;
if (@lib && ! $lib[0]) {
# '/abs/olute/' path
lib->import($_);
next;
}
- my $dir = catdir( shell_resolve( [ @base ], \@lib ) );
+ my $dir = File::Spec->catdir( shell_resolve( [ @base ], \@lib ) );
unless (-d $dir) {
## Try the old way (<0.03)
- $dir = catdir($Base, $_);
+ $dir = File::Spec->catdir($Base, $_);
}
next unless -d $dir;
lib->import( $dir );
}
-
- while (my ($pkg, $args) = each %{ $param{pkgs} || {} }) {
- eval "require $pkg";
- if ($@) {
- die $@;
- }
- $pkg->import( @{ $args || [] } );
- }
-}
+}
+
+=head2 base
+
+Returns the detected base (the directory where the script lives in). It's a
+string, and is the same as C<$Find::Lib::Base>.
+
+=cut
+
+sub base { return $Base }
+
+=head2 catfile
+
+A shorcut to L<File::Spec::catfile> using B<Find::Lib>'s base.
+
+=cut
+
+sub catfile {
+ my $class = shift;
+ return File::Spec->catfile($Base, @_);
+}
+
+=head2 catdir
+
+A shorcut to L<File::Spec::catdir> using B<Find::Lib>'s base.
+
+=cut
+
+sub catdir {
+ my $class = shift;
+ return File::Spec->catdir($Base, @_);
+}
+
+=head1 BACKWARD COMPATIBILITY
+
+in versions <1.0 of Find::Lib, the import arguments allowed you to specify
+a Bootstrap package. This option is now B<removed> breaking backward
+compatibility. I'm sorry about that, but that was a dumb idea of mine to
+save more typing. But it saves, like, 3 characters at the expense of
+readability. So, I'm sure I didn't break anybody, because probabaly no one
+was relying on a stupid behaviour.
+
+However, the multiple libs argument passing is kept intact: you can still
+use:
+
+ use Find::Lib libs => [ 'a', 'b', 'c' ];
+
+
+where C<libs> is a reference to a list of path to add to C<@INC>.
+
+The short forms implies that the first argument passed to import is not C<libs>
+or C<pkgs>. An example of usage is given in the SYNOPSIS section.
=head1 SEE ALSO
L<FindBin>, L<FindBin::libs>, L<lib>, L<rlib>, L<local::lib>
+L<http://blog.cyberion.net/2009/10/ive-done-something-bad-i-broke-backward-compatibility.html>
=head1 AUTHOR
Added: branches/upstream/libfind-lib-perl/current/t/01-basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/01-basic.t?rev=46482&op=file
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/01-basic.t (added)
+++ branches/upstream/libfind-lib-perl/current/t/01-basic.t Wed Oct 28 14:14:23 2009
@@ -1,0 +1,18 @@
+use strict;
+use Test::More tests => 8;
+
+require 't/testutils.pl';
+
+use File::Spec;
+use Find::Lib 'mylib';
+use_ok 'MyLib';
+
+in_inc( 'mylib' );
+
+my $base = Find::Lib->base;
+ok $base, 'base() returns the directory of your script';
+is $base, $Find::Lib::Base, "It's accessible from outside";
+
+is (Find::Lib->catfile('something'), File::Spec->catfile($base, 'something'));
+is (Find::Lib->catdir('dir'), File::Spec->catdir($base, 'dir'));
+is (Find::Lib->catdir('..', 'dir'), File::Spec->catdir($base, '..', 'dir'));
Modified: branches/upstream/libfind-lib-perl/current/t/02-use.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/02-use.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/02-use.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/02-use.t Wed Oct 28 14:14:23 2009
@@ -3,7 +3,8 @@
require 't/testutils.pl';
-use Find::Lib 'mylib', 'MyLib';
+use Find::Lib 'mylib';
+use MyLib;
ok my $path = $INC{ 'MyLib.pm' }, "MyLib used";
like $path, qr/mylib/, "just to be sure :)";
Modified: branches/upstream/libfind-lib-perl/current/t/07-libs.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/07-libs.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/07-libs.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/07-libs.t Wed Oct 28 14:14:23 2009
@@ -3,5 +3,6 @@
require 't/testutils.pl';
-use Find::Lib 'libs', 'Foo', a => 1, b => 42;
+use Find::Lib 'libs';
+use Foo a => 1, b => 42;
in_inc( 'libs' );
Modified: branches/upstream/libfind-lib-perl/current/t/08-dupe-slashes.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/08-dupe-slashes.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/08-dupe-slashes.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/08-dupe-slashes.t Wed Oct 28 14:14:23 2009
@@ -3,5 +3,6 @@
require 't/testutils.pl';
-use Find::Lib './///libs', 'Foo', a => 1, b => 42;
+use Find::Lib './///libs';
+use Foo;
in_inc( 'libs' );
Modified: branches/upstream/libfind-lib-perl/current/t/moretests/01-relative.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/01-relative.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/01-relative.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/01-relative.t Wed Oct 28 14:14:23 2009
@@ -1,10 +1,8 @@
use strict;
use Test::More tests => 3;
-use Find::Lib libs => [ '../mylib', 'mytestlib' ],
- pkgs => { MyLib => [ a => 1, b => 42+42 ],
- 'Test::More' => [],
- };
+use Find::Lib '../mylib', 'mytestlib';
+use MyLib a => 1, b => 42+42;
ok $MyLib::imported{'a'};
is $MyLib::imported{'b'}, 84;
Modified: branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0-begin.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0-begin.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0-begin.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0-begin.t Wed Oct 28 14:14:23 2009
@@ -6,7 +6,8 @@
use Find::Lib;
eval {
- Find::Lib->import('../mylib', 'MyLib', a => 1, b => 42);
+ Find::Lib->import('../mylib');
+ eval "use MyLib a => 1, b => 42;"; die $@ if $@;
};
chomp $@;
ok $@, "we die if \$0 ($0) doesn't make sense";
Modified: branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/02-dollar0.t Wed Oct 28 14:14:23 2009
@@ -2,7 +2,8 @@
use Test::More tests => 3;
$0 = "Renammed";
-use Find::Lib '../mylib', 'MyLib', a => 1, b => 42;
+use Find::Lib '../mylib';
+use MyLib a => 1, b => 42;
ok $MyLib::imported{'a'};
is $MyLib::imported{'b'}, 42;
Modified: branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-begin.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-begin.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-begin.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-begin.t Wed Oct 28 14:14:23 2009
@@ -6,7 +6,8 @@
BEGIN { chdir '/tmp' };
eval {
- Find::Lib->import('../mylib', 'MyLib', a => 1, b => 42);
+ Find::Lib->import('../mylib');
+ eval "use MyLib a => 1, b => 42;"; die $@ if $@;
};
ok ! $@, "we didn't die, because initial Find::Lib compilation saved cwd";
Modified: branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-topbegin.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-topbegin.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-topbegin.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-topbegin.t Wed Oct 28 14:14:23 2009
@@ -6,6 +6,8 @@
use Find::Lib;
eval {
- Find::Lib->import('../mylib', 'MyLib', a => 1, b => 42);
+ Find::Lib->import('../mylib');
+ eval "use MyLib a => 1, b => 42;"; die $@ if $@;
};
-ok !$@, "we didn't die because chdir doesn't change PWD, so we are safe";
+ok !$@, "we didn't die because chdir doesn't change PWD, so we are safe"
+ or diag $@;
Modified: branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir.t Wed Oct 28 14:14:23 2009
@@ -3,7 +3,8 @@
chdir "/";
-use Find::Lib '../mylib', 'MyLib', a => 1, b => 42;
+use Find::Lib '../mylib';
+use MyLib a => 1, b => 42;
ok $MyLib::imported{'a'};
is $MyLib::imported{'b'}, 42;
Modified: branches/upstream/libfind-lib-perl/current/t/moretests/04-symlinks.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/04-symlinks.t?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/04-symlinks.t (original)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/04-symlinks.t Wed Oct 28 14:14:23 2009
@@ -1,4 +1,5 @@
use strict;
+use warnings;
use Test::More;
use File::Copy;
use File::Spec;
@@ -46,9 +47,10 @@
## damn chdir doesn't update PWD unless comming from non-core Cwd
local $ENV{PWD} = File::Spec->catdir( $ENV{PWD}, $link );
## execute from there, if all is ok, succeeds
- my $ret = system 'perl', $script;
- ok !$ret, "our script worked, meaning that compilation with symlink worked";
+ my $ret = system $^X, $script;
+ ok !$ret, "script succeeded, meaning that compilation with symlink worked"
+ or diag "PWD=$ENV{PWD}, script=$script";
- $ret = system 'perl', ".///$script";
+ $ret = system $^X, ".///$script";
ok !$ret, "crufty path doesn't make it blow up";
}
Added: branches/upstream/libfind-lib-perl/current/t/moretests/05-backcompat.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/05-backcompat.t?rev=46482&op=file
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/05-backcompat.t (added)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/05-backcompat.t Wed Oct 28 14:14:23 2009
@@ -1,0 +1,9 @@
+use strict;
+use Test::More tests => 3;
+
+use Find::Lib libs => [ '../mylib', 'mytestlib'];
+use MyLib a => 1, b => 42+42;
+
+ok $MyLib::imported{'a'};
+is $MyLib::imported{'b'}, 84;
+
Added: branches/upstream/libfind-lib-perl/current/t/moretests/06-conflict.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/06-conflict.t?rev=46482&op=file
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/06-conflict.t (added)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/06-conflict.t Wed Oct 28 14:14:23 2009
@@ -1,0 +1,11 @@
+use strict;
+use Test::More tests => 3;
+
+## this is potentially conflicting with backward
+## except that we're smart enough to detect it
+use Find::Lib 'libs', '../mylib', 'mytestlib';
+use MyLib a => 1, b => 42+42;
+
+ok $MyLib::imported{'a'};
+is $MyLib::imported{'b'}, 84;
+
Modified: branches/upstream/libfind-lib-perl/current/t/moretests/symlink_test.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfind-lib-perl/current/t/moretests/symlink_test.pl?rev=46482&op=diff
==============================================================================
--- branches/upstream/libfind-lib-perl/current/t/moretests/symlink_test.pl (original)
+++ branches/upstream/libfind-lib-perl/current/t/moretests/symlink_test.pl Wed Oct 28 14:14:23 2009
@@ -2,5 +2,6 @@
## this is not a test in itself, don't execute
## this is a script that is executed by a test
-use Find::Lib '../t/mylib', 'MyLibNoTest';
+use Find::Lib '../t/mylib';
+use MyLibNoTest;
exit 0;
More information about the Pkg-perl-cvs-commits
mailing list