[Bast-commits] r6242 - in local-lib/1.000/trunk: . lib/local t
t/dist t/dist/EUMM t/dist/EUMM/lib t/dist/MB t/dist/MB/lib
apeiron at dev.catalyst.perl.org
apeiron at dev.catalyst.perl.org
Wed May 13 00:53:03 GMT 2009
Author: apeiron
Date: 2009-05-13 00:53:03 +0000 (Wed, 13 May 2009)
New Revision: 6242
Added:
local-lib/1.000/trunk/t/dist/
local-lib/1.000/trunk/t/dist/EUMM/
local-lib/1.000/trunk/t/dist/EUMM/Makefile.PL
local-lib/1.000/trunk/t/dist/EUMM/lib/
local-lib/1.000/trunk/t/dist/EUMM/lib/EUMM.pm
local-lib/1.000/trunk/t/dist/MB/
local-lib/1.000/trunk/t/dist/MB/Build.PL
local-lib/1.000/trunk/t/dist/MB/lib/
local-lib/1.000/trunk/t/dist/MB/lib/MB.pm
local-lib/1.000/trunk/t/install.t
Modified:
local-lib/1.000/trunk/Changes
local-lib/1.000/trunk/lib/local/lib.pm
Log:
Additional install tests from Hans Dieter Pearcey (hdp at cpan.org). Thanks!
Modified: local-lib/1.000/trunk/Changes
===================================================================
--- local-lib/1.000/trunk/Changes 2009-05-12 20:15:40 UTC (rev 6241)
+++ local-lib/1.000/trunk/Changes 2009-05-13 00:53:03 UTC (rev 6242)
@@ -1,8 +1,12 @@
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 at cpan.org>.
+ Thanks!
+
1.003003 2009-04-09
- Expose the internals per RT #36846.
- Fix the MANIFEST up a bit.
Modified: local-lib/1.000/trunk/lib/local/lib.pm
===================================================================
--- local-lib/1.000/trunk/lib/local/lib.pm 2009-05-12 20:15:40 UTC (rev 6241)
+++ local-lib/1.000/trunk/lib/local/lib.pm 2009-05-13 00:53:03 UTC (rev 6242)
@@ -11,7 +11,7 @@
use Carp ();
use Config;
-our $VERSION = '1.003003'; # 1.3.3
+our $VERSION = '1.003004'; # 1.3.4
sub import {
my ($class, @args) = @_;
@@ -613,6 +613,9 @@
Doc patches for a custom local::lib patch contributed by Torsten Raudssus
<torsten at raudssus.de>.
+Hans Dieter Pearcey <hdp at 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
Added: local-lib/1.000/trunk/t/dist/EUMM/Makefile.PL
===================================================================
--- local-lib/1.000/trunk/t/dist/EUMM/Makefile.PL (rev 0)
+++ local-lib/1.000/trunk/t/dist/EUMM/Makefile.PL 2009-05-13 00:53:03 UTC (rev 6242)
@@ -0,0 +1,5 @@
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'EUMM',
+);
Added: local-lib/1.000/trunk/t/dist/EUMM/lib/EUMM.pm
===================================================================
--- local-lib/1.000/trunk/t/dist/EUMM/lib/EUMM.pm (rev 0)
+++ local-lib/1.000/trunk/t/dist/EUMM/lib/EUMM.pm 2009-05-13 00:53:03 UTC (rev 6242)
@@ -0,0 +1 @@
+1;
Added: local-lib/1.000/trunk/t/dist/MB/Build.PL
===================================================================
--- local-lib/1.000/trunk/t/dist/MB/Build.PL (rev 0)
+++ local-lib/1.000/trunk/t/dist/MB/Build.PL 2009-05-13 00:53:03 UTC (rev 6242)
@@ -0,0 +1,6 @@
+use Module::Build;
+Module::Build->new(
+ module_name => "MB",
+ dist_version => 1,
+ license => "perl",
+)->create_build_script;
Added: local-lib/1.000/trunk/t/dist/MB/lib/MB.pm
===================================================================
--- local-lib/1.000/trunk/t/dist/MB/lib/MB.pm (rev 0)
+++ local-lib/1.000/trunk/t/dist/MB/lib/MB.pm 2009-05-13 00:53:03 UTC (rev 6242)
@@ -0,0 +1 @@
+our $VERSION = 1; 1;
Added: local-lib/1.000/trunk/t/install.t
===================================================================
--- local-lib/1.000/trunk/t/install.t (rev 0)
+++ local-lib/1.000/trunk/t/install.t 2009-05-13 00:53:03 UTC (rev 6242)
@@ -0,0 +1,41 @@
+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",
+ );
+}
More information about the Bast-commits
mailing list