my $upload = Catalyst::Request::Upload->new(
filename => $parameters{filename},
- size => ( stat $fh )[7],
+ size => ( $fh->stat )[7],
tempname => $fh->filename,
type => $part->content_type
);
$c->forward('show-message');
}
- show-message : Private {
+ sub show-message : Private {
my ( $self, $c ) = @_;
$c->res->output( $c->stash->{message} );
}
=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
my $c = shift;
unless ( $_[0] ) {
- $c->NEXT::error(@_);
+ return $c->NEXT::error(@_);
}
if ( $_[0] =~ /^(Unknown resource|No default action defined)/ ) {
$c->forward('three');
}
+
+sub inheritance : Relative {
+ my ( $self, $c ) = @_;
+ $c->forward('engine/response/cookies/one');
+ $c->forward('five');
+}
+
1;
my ( $self, $c ) = @_;
my $a = 0;
my $b = 0;
- my $c = $a / $b;
+ my $t = $a / $b;
}
sub two : Relative {