[Bps-public-commit] app-moduleshere branch, master, created. a9a2462bd62d2fb40e451fb4abeccf2038da5e01

? sunnavy sunnavy at bestpractical.com
Sat Apr 24 20:00:13 EDT 2010


The branch, master has been created
        at  a9a2462bd62d2fb40e451fb4abeccf2038da5e01 (commit)

- Log -----------------------------------------------------------------
commit dd58dc3fa17fd94ffc55e80a9bb52c75d1599ade
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 03:15:44 2010 +0800

    initial commit, with useful contents ;)

diff --git a/Changes b/Changes
new file mode 100644
index 0000000..b1bfec2
--- /dev/null
+++ b/Changes
@@ -0,0 +1,5 @@
+Revision history for App-moduleshere
+
+{{$NEXT}}
+     Initial release.
+
diff --git a/bin/mhere b/bin/mhere
new file mode 100755
index 0000000..534f4fe
--- /dev/null
+++ b/bin/mhere
@@ -0,0 +1,40 @@
+#!/usr/bin/env perl 
+use strict;
+use warnings;
+use File::Spec::Functions qw/catdir/;
+use File::Path 'mkpath';
+use File::Copy qw(copy);
+ at ARGV = grep { defined } @ARGV;
+undef @ARGV if grep { /^-/ } @ARGV; # force to show usage if found -
+
+if (@ARGV) {
+    my $to = $ENV{APP_MODULES_HERE} || '.';
+    my @success;
+    for my $mod (@ARGV) {
+        eval "require $mod" or warn "failed to require $mod" and next;
+
+        my @parts = split /::/, $mod;
+        my $inc = join( '/', @parts ) . '.pm';
+        my $source = $INC{$inc};
+        warn "failed to fild source of $mod" && next unless $source;
+        my $here =
+          catdir( $to, @parts[ 0 .. $#parts - 1 ] );
+        mkpath($here)
+          or warn "failed to make path $here: $!" and next
+          unless -e $here;
+        copy( $source, $here ) or warn "failed to copy $source to $here: $!";
+        push @success, $mod;
+    }
+    print 'copied modules: ', join ', ', @success;
+    print "\n";
+}
+else {
+    print <<'EOF';
+USAGE: mhere Module [ ... ]
+EXAMPLES:
+    mhere Carp                                    # copy Carp.pm in @INC to cwd
+    mhere Carp CGI                                # copy both Carp.pm and CGI.pm
+    APP_MODULES_HERE=outlib mhere Carp            # copy to outlib dir in cwd
+    APP_MODULES_HERE=/tmp/ mhere Carp             # copy to /tmp/
+EOF
+}
diff --git a/dist.ini b/dist.ini
new file mode 100644
index 0000000..58f21a1
--- /dev/null
+++ b/dist.ini
@@ -0,0 +1,10 @@
+name    = App-moduleshere
+version = 0.01
+author  = sunnavy <sunnavy at bestpractical.com>
+license = Perl_5
+copyright_holder = Best Practical Solutions 
+
+[@Basic]
+[NextRelease]
+    format = %-6v %{yyyy-MM-dd HH:mm:ss VV}d
+[PodSyntaxTests]
diff --git a/lib/App/moduleshere.pm b/lib/App/moduleshere.pm
new file mode 100644
index 0000000..2695f0f
--- /dev/null
+++ b/lib/App/moduleshere.pm
@@ -0,0 +1,60 @@
+package App::moduleshere;
+
+use warnings;
+use strict;
+our $VERSION = '0.01';
+
+1;
+
+__END__
+
+=head1 NAME
+
+App::moduleshere - copy modules(.pm) to cwd or somewhere
+
+=head1 SYNOPSIS
+
+    mhere Carp                                    # copy Carp.pm in @INC to cwd
+    mhere Carp CGI                                # copy both Carp.pm and CGI.pm
+    APP_MODULES_HERE=outlib mhere Carp            # copy to outlib dir in cwd
+    APP_MODULES_HERE=/tmp/ mhere Carp             # copy to /tmp/
+
+=head1 DESCRIPTION
+
+This small script(C<mhere>) helps you copy modules to somewhere you like.
+by default, it will copy to your current working directory.
+
+It's first written when I tried to trace a bug in one of my modules which 
+led me to the other module(let's call it C<Foo> here) in C<@INC>.
+
+So I ran C<perldoc -l Foo> to find its path, edited it to add more debug
+info, forced save it(happy that I had the write permission),
+then reproduced the bug to go on debugging, and so on.
+
+After fixed the bug, I was happy and decided to do something
+else, I almost forgot that I changed C<Foo> before!
+(believe me, I totally forgot it a couple of times)
+So I switched to C<Foo>, reversed all changed I've made, and forced save
+it again. 
+
+That was a bad experience so I decided to make a new approach. that is,
+to copy relative modules to current working directory and make changes there.
+after all done we can just remove it with a clean, untouched C<@INC>.
+The new one is better, at least for me, wish it can help you too :)
+
+=head1 BUGS AND LIMITATIONS
+
+No bugs have been reported.
+
+=head1 AUTHOR
+
+<sunnavy>  C<< <<sunnavy at bestpractical.com>> >>
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright 2010 Best Practical Solutions.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
diff --git a/t/00.load.t b/t/00.load.t
new file mode 100644
index 0000000..6e4bc43
--- /dev/null
+++ b/t/00.load.t
@@ -0,0 +1,7 @@
+use Test::More tests => 1;
+
+BEGIN {
+    use_ok('App::moduleshere');
+}
+
+diag("Testing App::moduleshere $App::moduleshere::VERSION");
diff --git a/t/01.mhere.t b/t/01.mhere.t
new file mode 100644
index 0000000..e71249b
--- /dev/null
+++ b/t/01.mhere.t
@@ -0,0 +1,53 @@
+use strict;
+use warnings;
+
+use Test::More tests => 8;
+use File::Temp 'tempdir';
+use FindBin;
+use File::Spec::Functions qw/catfile updir/;
+my $mhere = catfile( $FindBin::Bin, updir, '/bin/mhere' );
+
+my $dir = tempdir( CLEANUP => 1 );
+local $ENV{APP_MODULES_HERE} = $dir;
+my $usage = <<'EOF';
+USAGE: mhere Module [ ... ]
+EXAMPLES:
+    mhere Carp                                    # copy Carp.pm in @INC to cwd
+    mhere Carp CGI                                # copy both Carp.pm and CGI.pm
+    APP_MODULES_HERE=outlib mhere Carp            # copy to outlib dir in cwd
+    APP_MODULES_HERE=/tmp/ mhere Carp             # copy to /tmp/
+EOF
+
+is( `$mhere`,        $usage, 'mhere without args shows usage' );
+is( `$mhere -h`,     $usage, 'mhere -h shows useage too' );
+is( `$mhere -h Foo`, $usage, 'mhere -h Foo shows usage too' );
+
+is( `$mhere strict`, 'copied modules: strict' . "\n", 'mhere strict' );
+is(
+    `$mhere File::Spec::Functions`,
+    'copied modules: File::Spec::Functions' . "\n",
+    'mhere File::Spec::Functions'
+);
+
+open my $ori_fh, '<', $INC{'strict.pm'} or die $!;
+open my $new_fh, '<', catfile( $dir, 'strict.pm' ) or die $!;
+
+{
+    local $/;
+    is( <$ori_fh>, <$new_fh>, 'copied strict.pm is indeed a copy' )
+}
+
+open $ori_fh, '<', $INC{'File/Spec/Functions.pm'} or die $!;
+open $new_fh, '<', catfile( $dir, 'File', 'Spec', 'Functions.pm' ) or die $!;
+
+{
+    local $/;
+    is( <$ori_fh>, <$new_fh>, 'copied File/Spec/Functions.pm is indeed a copy' )
+}
+
+is(
+    `$mhere strict File::Spec::Functions`,
+    'copied modules: strict, File::Spec::Functions' . "\n",
+    'mhere strict, File::Spec::Functions'
+);
+

commit 4d4a0b6e5adbaa352d97081842c0dca1fdf94732
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 03:22:10 2010 +0800

    add ConfirmRelease

diff --git a/dist.ini b/dist.ini
index 58f21a1..79af558 100644
--- a/dist.ini
+++ b/dist.ini
@@ -8,3 +8,4 @@ copyright_holder = Best Practical Solutions
 [NextRelease]
     format = %-6v %{yyyy-MM-dd HH:mm:ss VV}d
 [PodSyntaxTests]
+[ConfirmRelease]

commit 7722026b29829d6796f34a51c1e933dbd5357216
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 03:22:18 2010 +0800

    update Changes

diff --git a/Changes b/Changes
index b1bfec2..68306b8 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for App-moduleshere
 
 {{$NEXT}}
+
+0.01   2010-04-24 03:19:43 CST
      Initial release.
 

commit ac72103d02ec5db39e97e2d687bf4e4ad15a984c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 06:02:21 2010 +0800

    add the test that source and destination are the same path

diff --git a/t/01.mhere.t b/t/01.mhere.t
index e71249b..4583613 100644
--- a/t/01.mhere.t
+++ b/t/01.mhere.t
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 8;
+use Test::More tests => 9;
 use File::Temp 'tempdir';
 use FindBin;
 use File::Spec::Functions qw/catfile updir/;
@@ -51,3 +51,10 @@ is(
     'mhere strict, File::Spec::Functions'
 );
 
+# test if the source and the destination is the same file
+is(
+    `$^X -I$dir $mhere strict`,
+    '0 modules are copied' . "\n",
+    "don't copy if the source and destination are the same path"
+);
+

commit 881d4bd7cfa6b6ada8ec9cab1178f06f58312dc7
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 06:02:59 2010 +0800

    don't copy if the source and destination are the same path, also tweak the message a bit

diff --git a/bin/mhere b/bin/mhere
index 534f4fe..922a719 100755
--- a/bin/mhere
+++ b/bin/mhere
@@ -1,9 +1,9 @@
 #!/usr/bin/env perl 
 use strict;
 use warnings;
-use File::Spec::Functions qw/catdir/;
+use File::Spec::Functions qw/catdir catfile rel2abs/;
 use File::Path 'mkpath';
-use File::Copy qw(copy);
+use File::Copy qw/copy/;
 @ARGV = grep { defined } @ARGV;
 undef @ARGV if grep { /^-/ } @ARGV; # force to show usage if found -
 
@@ -16,7 +16,13 @@ if (@ARGV) {
         my @parts = split /::/, $mod;
         my $inc = join( '/', @parts ) . '.pm';
         my $source = $INC{$inc};
-        warn "failed to fild source of $mod" && next unless $source;
+        warn "failed to fild source of $mod" and next unless $source;
+
+        my $dest = catfile( $to, @parts ) . '.pm';
+        warn "failed to copy $source to $dest: they are the same path"
+          and next
+          if rel2abs($source) eq rel2abs($dest);
+
         my $here =
           catdir( $to, @parts[ 0 .. $#parts - 1 ] );
         mkpath($here)
@@ -25,8 +31,13 @@ if (@ARGV) {
         copy( $source, $here ) or warn "failed to copy $source to $here: $!";
         push @success, $mod;
     }
-    print 'copied modules: ', join ', ', @success;
-    print "\n";
+    if (@success) {
+        print 'copied modules: ', join ', ', @success;
+        print "\n";
+    }
+    else {
+        print "0 modules are copied\n";
+    }
 }
 else {
     print <<'EOF';

commit be0a6ed283474c749c326593ff152a6a74ae06f0
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 06:04:02 2010 +0800

    update version to 0.02

diff --git a/dist.ini b/dist.ini
index 79af558..2b6b279 100644
--- a/dist.ini
+++ b/dist.ini
@@ -1,5 +1,5 @@
 name    = App-moduleshere
-version = 0.01
+version = 0.02
 author  = sunnavy <sunnavy at bestpractical.com>
 license = Perl_5
 copyright_holder = Best Practical Solutions 
diff --git a/lib/App/moduleshere.pm b/lib/App/moduleshere.pm
index 2695f0f..3b80831 100644
--- a/lib/App/moduleshere.pm
+++ b/lib/App/moduleshere.pm
@@ -2,7 +2,7 @@ package App::moduleshere;
 
 use warnings;
 use strict;
-our $VERSION = '0.01';
+our $VERSION = '0.02';
 
 1;
 

commit 1a31aaaadd560ba23ea858909b7a996266f82b25
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 06:07:56 2010 +0800

    update Changes

diff --git a/Changes b/Changes
index 68306b8..fbca12f 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,10 @@ Revision history for App-moduleshere
 
 {{$NEXT}}
 
+0.02   2010-04-24 06:07:05 CST
+
+    Don't copy if the source and destination have the same path.
+
 0.01   2010-04-24 03:19:43 CST
-     Initial release.
+    Initial release.
 

commit 3d67432eb3ace94091495237f0831b857ef96c07
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 06:15:14 2010 +0800

    Basic plugin contains ConfirmRelease

diff --git a/dist.ini b/dist.ini
index 2b6b279..2e82864 100644
--- a/dist.ini
+++ b/dist.ini
@@ -8,4 +8,3 @@ copyright_holder = Best Practical Solutions
 [NextRelease]
     format = %-6v %{yyyy-MM-dd HH:mm:ss VV}d
 [PodSyntaxTests]
-[ConfirmRelease]

commit 5119d22e7b441ed52a7483b79af1b55c3e96f539
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 07:39:58 2010 +0800

    update tests to call mhere with $^X

diff --git a/t/01.mhere.t b/t/01.mhere.t
index 4583613..43fa702 100644
--- a/t/01.mhere.t
+++ b/t/01.mhere.t
@@ -18,13 +18,13 @@ EXAMPLES:
     APP_MODULES_HERE=/tmp/ mhere Carp             # copy to /tmp/
 EOF
 
-is( `$mhere`,        $usage, 'mhere without args shows usage' );
-is( `$mhere -h`,     $usage, 'mhere -h shows useage too' );
-is( `$mhere -h Foo`, $usage, 'mhere -h Foo shows usage too' );
+is( `$^X $mhere`,        $usage, 'mhere without args shows usage' );
+is( `$^X $mhere -h`,     $usage, 'mhere -h shows useage too' );
+is( `$^X $mhere -h Foo`, $usage, 'mhere -h Foo shows usage too' );
 
-is( `$mhere strict`, 'copied modules: strict' . "\n", 'mhere strict' );
+is( `$^X $mhere strict`, 'copied modules: strict' . "\n", 'mhere strict' );
 is(
-    `$mhere File::Spec::Functions`,
+    `$^X $mhere File::Spec::Functions`,
     'copied modules: File::Spec::Functions' . "\n",
     'mhere File::Spec::Functions'
 );
@@ -46,7 +46,7 @@ open $new_fh, '<', catfile( $dir, 'File', 'Spec', 'Functions.pm' ) or die $!;
 }
 
 is(
-    `$mhere strict File::Spec::Functions`,
+    `$^X $mhere strict File::Spec::Functions`,
     'copied modules: strict, File::Spec::Functions' . "\n",
     'mhere strict, File::Spec::Functions'
 );

commit 68036c9654dce3530cfce5ab050f0eda317c7ce9
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Apr 24 07:40:08 2010 +0800

    update version to 0.03

diff --git a/Changes b/Changes
index fbca12f..880abfd 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,10 @@ Revision history for App-moduleshere
 
 {{$NEXT}}
 
+0.03   2010-04-24 07:38:53 CST
+
+    In tests, call `mhere' using $^X
+
 0.02   2010-04-24 06:07:05 CST
 
     Don't copy if the source and destination have the same path.
diff --git a/dist.ini b/dist.ini
index 2e82864..aa53f63 100644
--- a/dist.ini
+++ b/dist.ini
@@ -1,5 +1,5 @@
 name    = App-moduleshere
-version = 0.02
+version = 0.03
 author  = sunnavy <sunnavy at bestpractical.com>
 license = Perl_5
 copyright_holder = Best Practical Solutions 
diff --git a/lib/App/moduleshere.pm b/lib/App/moduleshere.pm
index 3b80831..a96913d 100644
--- a/lib/App/moduleshere.pm
+++ b/lib/App/moduleshere.pm
@@ -2,7 +2,7 @@ package App::moduleshere;
 
 use warnings;
 use strict;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
 
 1;
 

commit d298f999607282b68e1bb9bc3f597ef8d1c833bb
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun Apr 25 07:28:20 2010 +0800

    warn and next if $here exists but not a directory

diff --git a/bin/mhere b/bin/mhere
index 922a719..fe4cdb4 100755
--- a/bin/mhere
+++ b/bin/mhere
@@ -25,6 +25,11 @@ if (@ARGV) {
 
         my $here =
           catdir( $to, @parts[ 0 .. $#parts - 1 ] );
+        if ( -e $here && !-d $here ) {
+            warn "failed to make path $here: it exists but not a directory";
+            next;
+        }
+
         mkpath($here)
           or warn "failed to make path $here: $!" and next
           unless -e $here;

commit 314a846f2ad0e2e64577a4f490441e4a78c8b792
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun Apr 25 07:32:39 2010 +0800

    warn and next if $to exists but not a directory

diff --git a/Changes b/Changes
index 880abfd..460f3a1 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,8 @@ Revision history for App-moduleshere
 
 {{$NEXT}}
 
+    Warn if we want a directory but get a plain file.
+
 0.03   2010-04-24 07:38:53 CST
 
     In tests, call `mhere' using $^X
diff --git a/bin/mhere b/bin/mhere
index fe4cdb4..5ef848a 100755
--- a/bin/mhere
+++ b/bin/mhere
@@ -10,32 +10,38 @@ undef @ARGV if grep { /^-/ } @ARGV; # force to show usage if found -
 if (@ARGV) {
     my $to = $ENV{APP_MODULES_HERE} || '.';
     my @success;
-    for my $mod (@ARGV) {
-        eval "require $mod" or warn "failed to require $mod" and next;
+    if ( -e $to && !-d $to ) {
+        warn "failed to make path $to: it exists but not a directory";
+    }
+    else {
+        for my $mod (@ARGV) {
+            eval "require $mod" or warn "failed to require $mod" and next;
 
-        my @parts = split /::/, $mod;
-        my $inc = join( '/', @parts ) . '.pm';
-        my $source = $INC{$inc};
-        warn "failed to fild source of $mod" and next unless $source;
+            my @parts = split /::/, $mod;
+            my $inc = join( '/', @parts ) . '.pm';
+            my $source = $INC{$inc};
+            warn "failed to fild source of $mod" and next unless $source;
 
-        my $dest = catfile( $to, @parts ) . '.pm';
-        warn "failed to copy $source to $dest: they are the same path"
-          and next
-          if rel2abs($source) eq rel2abs($dest);
+            my $dest = catfile( $to, @parts ) . '.pm';
+            warn "failed to copy $source to $dest: they are the same path"
+              and next
+              if rel2abs($source) eq rel2abs($dest);
 
-        my $here =
-          catdir( $to, @parts[ 0 .. $#parts - 1 ] );
-        if ( -e $here && !-d $here ) {
-            warn "failed to make path $here: it exists but not a directory";
-            next;
-        }
+            my $here = catdir( $to, @parts[ 0 .. $#parts - 1 ] );
+            if ( -e $here && !-d $here ) {
+                warn "failed to make path $here: it exists but not a directory";
+                next;
+            }
 
-        mkpath($here)
-          or warn "failed to make path $here: $!" and next
-          unless -e $here;
-        copy( $source, $here ) or warn "failed to copy $source to $here: $!";
-        push @success, $mod;
+            mkpath($here)
+              or warn "failed to make path $here: $!" and next
+              unless -e $here;
+            copy( $source, $here )
+              or warn "failed to copy $source to $here: $!";
+            push @success, $mod;
+        }
     }
+
     if (@success) {
         print 'copied modules: ', join ', ', @success;
         print "\n";
diff --git a/dist.ini b/dist.ini
index aa53f63..d137c9b 100644
--- a/dist.ini
+++ b/dist.ini
@@ -1,5 +1,5 @@
 name    = App-moduleshere
-version = 0.03
+version = 0.04
 author  = sunnavy <sunnavy at bestpractical.com>
 license = Perl_5
 copyright_holder = Best Practical Solutions 
diff --git a/lib/App/moduleshere.pm b/lib/App/moduleshere.pm
index a96913d..9b280e8 100644
--- a/lib/App/moduleshere.pm
+++ b/lib/App/moduleshere.pm
@@ -2,7 +2,7 @@ package App::moduleshere;
 
 use warnings;
 use strict;
-our $VERSION = '0.03';
+our $VERSION = '0.04';
 
 1;
 

commit 45e3d10bcfc7569815518ea665fa080100898e99
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun Apr 25 07:34:19 2010 +0800

    don't show line info when warn

diff --git a/bin/mhere b/bin/mhere
index 5ef848a..b0e2578 100755
--- a/bin/mhere
+++ b/bin/mhere
@@ -11,33 +11,33 @@ if (@ARGV) {
     my $to = $ENV{APP_MODULES_HERE} || '.';
     my @success;
     if ( -e $to && !-d $to ) {
-        warn "failed to make path $to: it exists but not a directory";
+        warn "failed to make path $to: it exists but not a directory\n";
     }
     else {
         for my $mod (@ARGV) {
-            eval "require $mod" or warn "failed to require $mod" and next;
+            eval "require $mod" or warn "failed to require $mod\n" and next;
 
             my @parts = split /::/, $mod;
             my $inc = join( '/', @parts ) . '.pm';
             my $source = $INC{$inc};
-            warn "failed to fild source of $mod" and next unless $source;
+            warn "failed to fild source of $mod\n" and next unless $source;
 
             my $dest = catfile( $to, @parts ) . '.pm';
-            warn "failed to copy $source to $dest: they are the same path"
+            warn "failed to copy $source to $dest: they are the same path\n"
               and next
               if rel2abs($source) eq rel2abs($dest);
 
             my $here = catdir( $to, @parts[ 0 .. $#parts - 1 ] );
             if ( -e $here && !-d $here ) {
-                warn "failed to make path $here: it exists but not a directory";
+                warn "failed to make path $here: it exists but not a directory\n";
                 next;
             }
 
             mkpath($here)
-              or warn "failed to make path $here: $!" and next
+              or warn "failed to make path $here: $!\n" and next
               unless -e $here;
             copy( $source, $here )
-              or warn "failed to copy $source to $here: $!";
+              or warn "failed to copy $source to $here: $!\n";
             push @success, $mod;
         }
     }

commit d2327633024e30448a338026eaa339da7b49d615
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun Apr 25 07:36:13 2010 +0800

    update tests to make it happy

diff --git a/bin/mhere b/bin/mhere
index b0e2578..bedc249 100755
--- a/bin/mhere
+++ b/bin/mhere
@@ -43,7 +43,7 @@ if (@ARGV) {
     }
 
     if (@success) {
-        print 'copied modules: ', join ', ', @success;
+        print 'copied module(s): ', join ', ', @success;
         print "\n";
     }
     else {
diff --git a/t/01.mhere.t b/t/01.mhere.t
index 43fa702..5c7f620 100644
--- a/t/01.mhere.t
+++ b/t/01.mhere.t
@@ -22,10 +22,10 @@ is( `$^X $mhere`,        $usage, 'mhere without args shows usage' );
 is( `$^X $mhere -h`,     $usage, 'mhere -h shows useage too' );
 is( `$^X $mhere -h Foo`, $usage, 'mhere -h Foo shows usage too' );
 
-is( `$^X $mhere strict`, 'copied modules: strict' . "\n", 'mhere strict' );
+is( `$^X $mhere strict`, 'copied module(s): strict' . "\n", 'mhere strict' );
 is(
     `$^X $mhere File::Spec::Functions`,
-    'copied modules: File::Spec::Functions' . "\n",
+    'copied module(s): File::Spec::Functions' . "\n",
     'mhere File::Spec::Functions'
 );
 
@@ -47,7 +47,7 @@ open $new_fh, '<', catfile( $dir, 'File', 'Spec', 'Functions.pm' ) or die $!;
 
 is(
     `$^X $mhere strict File::Spec::Functions`,
-    'copied modules: strict, File::Spec::Functions' . "\n",
+    'copied module(s): strict, File::Spec::Functions' . "\n",
     'mhere strict, File::Spec::Functions'
 );
 

commit a9a2462bd62d2fb40e451fb4abeccf2038da5e01
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun Apr 25 07:38:14 2010 +0800

    update Changes

diff --git a/Changes b/Changes
index 460f3a1..dfeea31 100644
--- a/Changes
+++ b/Changes
@@ -2,7 +2,11 @@ Revision history for App-moduleshere
 
 {{$NEXT}}
 
+0.04   2010-04-25 07:37:46 CST
+
     Warn if we want a directory but get a plain file.
+    Warn without a line number to make the output clean.
+    Message tweak a bit
 
 0.03   2010-04-24 07:38:53 CST
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list