whitespace cleanup
[catagits/Catalyst-Devel.git] / lib / Catalyst / Helper.pm
index a5cf5a2..9785aec 100644 (file)
@@ -18,21 +18,11 @@ use namespace::autoclean;
 
 with 'MooseX::Emulate::Class::Accessor::Fast';
 
-# Change Catalyst/Devel.pm also
-our $VERSION = '1.34';
+our $VERSION = '1.41';
+$VERSION =~ tr/_//d;
 
 my %cache;
 
-=head1 NAME
-
-Catalyst::Helper - Bootstrap a Catalyst application
-
-=head1 SYNOPSIS
-
-  catalyst.pl <myappname>
-
-=cut
-
 sub get_sharedir_file {
     my ($self, @filename) = @_;
     my $dist_dir;
@@ -49,7 +39,7 @@ sub get_sharedir_file {
     }
     my $file = file( $dist_dir, @filename);
     Carp::confess("Cannot find $file") unless -r $file;
-    my $contents = $file->slurp;
+    my $contents = $file->slurp(iomode =>  "<:raw");
     return $contents;
 }
 
@@ -266,7 +256,7 @@ sub mk_file {
             $file .= '.new';
         }
     }
-    
+
     if ( my $f = IO::File->new("> $file") ) {
         binmode $f;
         print $f $content;
@@ -299,7 +289,7 @@ sub next_test {
 
 # Do not touch this method, *EVER*, it is needed for back compat.
 ## addendum: we had to split this method so we could have backwards
-## compatability.  otherwise, we'd have no way to pass stuff from __DATA__
+## compatibility.  otherwise, we'd have no way to pass stuff from __DATA__
 
 sub render_file {
     my ( $self, $file, $path, $vars, $perms ) = @_;
@@ -388,7 +378,7 @@ sub _mk_rootclass {
 
 sub _mk_makefile {
     my $self = shift;
-    $self->{path} = dir( 'lib', split( '::', $self->{name} ) );
+    $self->{path} = join('/', 'lib', split( '::', $self->{name} ) );
     $self->{path} .= '.pm';
     my $dir = $self->{dir};
     $self->render_sharedir_file( 'Makefile.PL.tt', file($dir, "Makefile.PL") );
@@ -543,6 +533,17 @@ sub _deprecate_file {
     }
 }
 
+1;
+__END__
+
+=head1 NAME
+
+Catalyst::Helper - Bootstrap a Catalyst application
+
+=head1 SYNOPSIS
+
+  catalyst.pl <myappname>
+
 =head1 DESCRIPTION
 
 This module is used by B<catalyst.pl> to create a set of scripts for a
@@ -670,7 +671,7 @@ These are the methods that the Helper classes can call on the
 =head2 render_file ($file, $path, $vars, $perms)
 
 Render and create a file from a template in DATA using Template
-Toolkit. $file is the relevent chunk of the __DATA__ section, $path is
+Toolkit. $file is the relevant chunk of the __DATA__ section, $path is
 the path to the file, $vars is the hashref as expected by
 L<Template Toolkit|Template> and $perms are desired permissions (or system
 defaults if not set).
@@ -710,20 +711,14 @@ Don't give the number or the .t suffix for the test name.
 
 Method for getting a file out of share/
 
-=cut
-
 =head2 render_file_contents
 
 Process a L<Template::Toolkit> template.
 
-=cut
-
 =head2 render_sharedir_file
 
 Render a template/image file from our share directory
 
-=cut
-
 =head1 NOTE
 
 The helpers will read author name from /etc/passwd by default.
@@ -744,6 +739,3 @@ This library is free software. You can redistribute it and/or modify
 it under the same terms as Perl itself.
 
 =cut
-
-1;
-