[Bps-public-commit] r9813 - bpsbuilder/BPB/lib/BPB/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Dec 4 10:27:08 EST 2007


Author: sunnavy
Date: Tue Dec  4 10:26:53 2007
New Revision: 9813

Modified:
   bpsbuilder/BPB/lib/BPB/Source/Directory.pm

Log:
follow support for directory source

Modified: bpsbuilder/BPB/lib/BPB/Source/Directory.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Directory.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Source/Directory.pm	Tue Dec  4 10:26:53 2007
@@ -13,14 +13,24 @@
 
 sub new {
     my $class = shift;
-    my $self  = $class::SUPER->new(@_);
+    my $self  = $class->SUPER::new(@_);
     $self->{source} =~ s{/$}{};    # trim the last / to let cp work as we like
     return $self;
 }
 
+=head2 run
+
+=cut
+
+sub run {
+    my $self = shift;
+    $self->SUPER::run();
+    $self->_follow($self->path) if $self->follow;
+}
+
 sub path {
     my $self = shift;
-    return basename $self->source;
+    return File::Spec->catfile($self->directory, basename $self->source);
 }
 
 sub _cmd {



More information about the Bps-public-commit mailing list