fixed warnings in tests
Christian Hansen [Wed, 13 Apr 2005 08:53:28 +0000 (08:53 +0000)]
lib/Catalyst/Engine/Test.pm
lib/Catalyst/Manual/Intro.pod
lib/Catalyst/Request/Upload.pm
t/lib/Catalyst/Plugin/Test/Errors.pm
t/lib/TestApp/Controller/Action/Forward.pm
t/lib/TestApp/Controller/Engine/Response/Errors.pm

index 143414e..d5fb8a7 100644 (file)
@@ -126,7 +126,7 @@ sub prepare_parameters {
 
                 my $upload = Catalyst::Request::Upload->new(
                     filename => $parameters{filename},
-                    size     => ( stat $fh )[7],
+                    size     => ( $fh->stat )[7],
                     tempname => $fh->filename,
                     type     => $part->content_type
                 );
index 0ee9174..c25b9ff 100644 (file)
@@ -237,7 +237,7 @@ The last of these, the stash, is a universal hash for sharing data among applica
         $c->forward('show-message');
     }
 
-    show-message : Private {
+    sub show-message : Private {
         my ( $self, $c ) = @_;
         $c->res->output( $c->stash->{message} );
     }
index 867c098..5df78ee 100644 (file)
@@ -44,8 +44,8 @@ Copies tempname using C<File::Copy>. Returns true for success, false otherwise.
 =cut
 
 sub copy_to {
-    my ( $self, $target, $buffer ) = @_;
-    return File::Copy::copy( $self->tempname, $target, $buffer );
+    my $self = shift;
+    return File::Copy::copy( $self->tempname, @_ );
 }
 
 =item $upload->fh
index 3365e2f..4dc0d57 100644 (file)
@@ -6,7 +6,7 @@ sub error {
     my $c = shift;
 
     unless ( $_[0] ) {
-        $c->NEXT::error(@_);
+        return $c->NEXT::error(@_);
     }
 
     if ( $_[0] =~ /^(Unknown resource|No default action defined)/ ) {
index ec3631a..44d0bad 100644 (file)
@@ -34,4 +34,11 @@ sub jojo : Relative {
     $c->forward('three');
 }
 
+
+sub inheritance : Relative {
+    my ( $self, $c ) = @_;
+    $c->forward('engine/response/cookies/one');
+    $c->forward('five');
+}
+
 1;
index 63c3f35..7e60a7f 100644 (file)
@@ -7,7 +7,7 @@ sub one : Relative {
     my ( $self, $c ) = @_;
     my $a = 0;
     my $b = 0;
-    my $c = $a / $b;
+    my $t = $a / $b;
 }
 
 sub two : Relative {