Revision history for local::lib
- - Additional documentation and examples concerning having multiple
- local::lib enviornments (amiri)
+1.003004 2009-05-12
+ - Additional documentation and examples concerning having multiple
+ local::lib enviornments (amiri)
+
+ - Some install tests courtesy of Hans Dieter Pearcey <hdp@cpan.org>.
+ Thanks!
1.003003 2009-04-09
- Expose the internals per RT #36846.
use Carp ();
use Config;
-our $VERSION = '1.003003'; # 1.3.3
+our $VERSION = '1.003004'; # 1.3.4
sub import {
my ($class, @args) = @_;
Doc patches for a custom local::lib patch contributed by Torsten Raudssus
<torsten@raudssus.de>.
+Hans Dieter Pearcey <hdp@cpan.org> sent in some additional tests for ensuring
+things will install properly.
+
=head1 LICENSE
This library is free software under the same license as perl itself
--- /dev/null
+use strict;
+use warnings;
+use Test::More;
+BEGIN { plan skip_all => "Install Capture::Tiny to test installation"
+ unless eval { require Capture::Tiny; 1 } }
+use Capture::Tiny qw(capture);
+use File::Temp qw(tempdir);
+use File::Spec;
+use Cwd;
+use Config;
+
+plan tests => 2;
+
+my $dir = tempdir(DIR => Cwd::abs_path('t'), CLEANUP => 1);
+
+use local::lib ();
+local::lib->import($dir);
+
+my $orig_dir = cwd;
+SKIP: for my $dist_type (qw(EUMM MB)) {
+ chdir File::Spec->catdir($orig_dir, qw(t dist), $dist_type);
+ if ($dist_type eq 'EUMM') {
+ my ($stdout, $stderr) = capture { eval {
+ system($^X, 'Makefile.PL') && die "Makefile.PL failed";
+ system($Config{make}, 'install') && die "$Config{make} install failed";
+ } };
+ diag $stdout, $stderr if $@;
+ } else {
+ my ($stdout, $stderr) = capture { eval {
+ system($^X, 'Build.PL') && die "Build.PL failed";
+ system($^X, 'Build', 'install') && die "Build install failed";
+ } };
+ diag $stdout, $stderr if $@;
+ }
+ ok(
+ -e File::Spec->catfile(
+ $dir, qw(lib perl5), "$dist_type.pm",
+ ),
+ "$dist_type.pm installed into the correct location",
+ );
+}