[Bps-public-commit] SD branch, master, updated. acb3e33ce6e2d745c59ccc3c0a1f0c0aa4d0123f

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jun 18 23:34:08 EDT 2009


The branch, master has been updated
       via  acb3e33ce6e2d745c59ccc3c0a1f0c0aa4d0123f (commit)
       via  4cffce880542a8f0cd14509a0c942d99be414c26 (commit)
      from  44f9e888e04ec1dc5974525a93b34b07e115ec78 (commit)

Summary of changes:
 Makefile.PL                               |    1 -
 lib/App/SD/CLI/Command.pm                 |   11 ++++++-----
 lib/App/SD/Replica/debbugs/PushEncoder.pm |    1 -
 lib/App/SD/Replica/gcode.pm               |    1 -
 lib/App/SD/Replica/gcode/PushEncoder.pm   |    1 -
 lib/App/SD/Replica/rt.pm                  |    1 -
 lib/App/SD/Replica/rt/PushEncoder.pm      |    1 -
 lib/App/SD/Replica/trac.pm                |    1 -
 lib/App/SD/Replica/trac/PushEncoder.pm    |    1 -
 9 files changed, 6 insertions(+), 13 deletions(-)

- Log -----------------------------------------------------------------
commit 4cffce880542a8f0cd14509a0c942d99be414c26
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jun 19 11:33:35 2009 +0800

    remove dep Path::Class

diff --git a/Makefile.PL b/Makefile.PL
index 8ba91a9..60c8a7b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -6,7 +6,6 @@ license('MIT');
 version_from('lib/App/SD.pm');
 requires('DateTime');
 requires('Time::Progress');
-requires('Path::Class');
 requires 'Prophet'; # URI UNIVERSAL::require Params::Validate Class::Accessor Template::Declare::Tags Test::HTTP::Server::Simple JSON Test::WWW::Mechanize Any::Moose
 requires('HTML::TreeBuilder');
 requires('DateTime::Format::Natural');
diff --git a/lib/App/SD/CLI/Command.pm b/lib/App/SD/CLI/Command.pm
index f26c77f..e280f8b 100644
--- a/lib/App/SD/CLI/Command.pm
+++ b/lib/App/SD/CLI/Command.pm
@@ -29,11 +29,12 @@ sub get_content {
     my %args = @_;
 
     my $content;
-    ### XXX Extract to a common "slurp" routine
-    require Path::Class; Path::Class->import('file'); # instead of use to get runtime loading
-    if (my $file = file($self->delete_arg('file'))) {
-        $content = $file->slurp();
-        $self->set_prop(name => $file->basename);
+    if (my $file = $self->delete_arg('file')) {
+        my ( $vol, $dir, $name ) = File::Spec->splitpath( $file );
+        local $/;
+        open my $fh, '<', $file;
+        $content = <$fh>;
+        $self->set_prop(name => $name);
     } elsif ($content = $self->delete_arg('content')) {
 
     } elsif ($args{default_edit} || $self->has_arg('edit')) {
diff --git a/lib/App/SD/Replica/debbugs/PushEncoder.pm b/lib/App/SD/Replica/debbugs/PushEncoder.pm
index fa120a0..5d5d49b 100644
--- a/lib/App/SD/Replica/debbugs/PushEncoder.pm
+++ b/lib/App/SD/Replica/debbugs/PushEncoder.pm
@@ -2,7 +2,6 @@ package App::SD::Replica::debbugs::PushEncoder;
 use Any::Moose;
 
 use Params::Validate;
-use Path::Class;
 
 has sync_source => 
     ( isa => 'App::SD::Replica::debbugs',
diff --git a/lib/App/SD/Replica/gcode.pm b/lib/App/SD/Replica/gcode.pm
index 748d658..08faa5e 100644
--- a/lib/App/SD/Replica/gcode.pm
+++ b/lib/App/SD/Replica/gcode.pm
@@ -3,7 +3,6 @@ use Any::Moose;
 extends qw/App::SD::ForeignReplica/;
 
 use Params::Validate qw(:all);
-use Path::Class;
 use File::Temp 'tempdir';
 use Memoize;
 
diff --git a/lib/App/SD/Replica/gcode/PushEncoder.pm b/lib/App/SD/Replica/gcode/PushEncoder.pm
index 556fe7d..ec05cb8 100644
--- a/lib/App/SD/Replica/gcode/PushEncoder.pm
+++ b/lib/App/SD/Replica/gcode/PushEncoder.pm
@@ -1,7 +1,6 @@
 package App::SD::Replica::gcode::PushEncoder;
 use Any::Moose;
 use Params::Validate;
-use Path::Class;
 use Net::Google::Code::Issue;
 use Net::Google::Code;
 
diff --git a/lib/App/SD/Replica/rt.pm b/lib/App/SD/Replica/rt.pm
index a0cfa7f..31c6b98 100644
--- a/lib/App/SD/Replica/rt.pm
+++ b/lib/App/SD/Replica/rt.pm
@@ -3,7 +3,6 @@ use Any::Moose;
 extends qw/App::SD::ForeignReplica/;
 
 use Params::Validate qw(:all);
-use Path::Class;
 use File::Temp 'tempdir';
 use Memoize;
 
diff --git a/lib/App/SD/Replica/rt/PushEncoder.pm b/lib/App/SD/Replica/rt/PushEncoder.pm
index 263bc67..9bf2831 100644
--- a/lib/App/SD/Replica/rt/PushEncoder.pm
+++ b/lib/App/SD/Replica/rt/PushEncoder.pm
@@ -4,7 +4,6 @@ use Any::Moose;
 extends 'App::SD::ForeignReplica::PushEncoder';
 
 use Params::Validate;
-use Path::Class;
 
 has sync_source => 
     ( isa => 'App::SD::Replica::rt',
diff --git a/lib/App/SD/Replica/trac.pm b/lib/App/SD/Replica/trac.pm
index 98c6f11..c9d04a6 100644
--- a/lib/App/SD/Replica/trac.pm
+++ b/lib/App/SD/Replica/trac.pm
@@ -3,7 +3,6 @@ use Any::Moose;
 extends qw/App::SD::ForeignReplica/;
 
 use Params::Validate qw(:all);
-use Path::Class;
 use File::Temp 'tempdir';
 use Memoize;
 
diff --git a/lib/App/SD/Replica/trac/PushEncoder.pm b/lib/App/SD/Replica/trac/PushEncoder.pm
index c73511c..c4bf0b9 100644
--- a/lib/App/SD/Replica/trac/PushEncoder.pm
+++ b/lib/App/SD/Replica/trac/PushEncoder.pm
@@ -1,7 +1,6 @@
 package App::SD::Replica::trac::PushEncoder;
 use Any::Moose; 
 use Params::Validate;
-use Path::Class;
 use Time::HiRes qw/usleep/;
 has sync_source => 
     ( isa => 'App::SD::Replica::trac',

commit acb3e33ce6e2d745c59ccc3c0a1f0c0aa4d0123f
Merge: 4cffce8... 44f9e88...
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jun 19 11:33:54 2009 +0800

    Merge branch 'master' of code.bestpractical.com:/git/sd


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



More information about the Bps-public-commit mailing list