[Catalyst-commits] r10873 - Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst

dhoss at dev.catalyst.perl.org dhoss at dev.catalyst.perl.org
Sun Jul 12 17:43:04 GMT 2009


Author: dhoss
Date: 2009-07-12 17:43:03 +0000 (Sun, 12 Jul 2009)
New Revision: 10873

Modified:
   Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm
Log:
unfucked


Modified: Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm	2009-07-12 17:31:46 UTC (rev 10872)
+++ Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm	2009-07-12 17:43:03 UTC (rev 10873)
@@ -239,6 +239,7 @@
             $file .= '.new';
         }
     }
+    
     if ( my $f = IO::File->new("> $file") ) {
         binmode $f;
         print $f $content;
@@ -442,7 +443,7 @@
 sub _mk_compclass {
     my $self = shift;
     my $file = $self->{file};
-    return $self->render_sharedir_file( 'lib', 'Helper', 'compclass.pl.tt', "$file" );
+    return $self->render_sharedir_file( 'lib', 'Helper', 'compclass.tt', "$file" );
 }
 
 sub _mk_comptest {
@@ -495,41 +496,6 @@
 }
 
 
-## this is so you don't have to do make install after every change to test
-sub _find_share_dir {
-  my ($self, $args) = @_;
-  my $share_name = $self->name;
-  if ($share_name =~ s!^/(.*?)/!!) {
-    my $dist = $1;
-    $args->{share_base_dir} = eval {
-        Dir->new(File::ShareDir::dist_dir($dist))
-           ->subdir('share');
-    };
-    if ($@) {
-        # not installed
-        my $file = __FILE__;
-        my $dir = Dir->new(dirname($file));
-        my $share_base;
-        while ($dir->parent) {
-            if (-d $dir->subdir('share') && -d $dir->subdir('share')->subdir('root')) {
-                $share_base = $dir->subdir('share')->subdir('root');
-                last;
-            }
-            $dir = $dir->parent;
-        }
-        confess "could not find sharebase by recursion. ended up at $dir, from $file"
-          unless $share_base;
-        $args->{share_base_dir} = $share_base;
-    }
-  }
-  my $base = $args->{share_base_dir}->subdir($share_name);
-  confess "No such share base directory ${base}"
-    unless -d $base;
-  $self->share_dir($base);
-};
-
-
-
 =head1 DESCRIPTION
 
 This module is used by B<catalyst.pl> to create a set of scripts for a




More information about the Catalyst-commits mailing list