Catalyst-ActionRole-Public

 view release on metacpan or  search on metacpan

lib/Catalyst/ActionRole/Public.pm  view on Meta::CPAN

    ':args' => \@args,
    '*' => \@args);

  my @path_parts = $self->expand_if_relative_path( 
    $self->expand_at_template($self->at, %template_args));

  $ctx->stash(public_file => 
    (my $full_path = $ctx->config->{root}->file(@path_parts)));

  unless($self->path_is_allowed_content_type($full_path)) {
    $ctx->log->debug("File '$full_path' is not allowed content-type") if $ctx->debug;
    return 0;
  }
  
  if($self->is_real_file($full_path)) {
    $ctx->log->debug("Serving File: $full_path for action $self") if $ctx->debug;
    return $self->$orig($ctx, $captures);
  } else {
    $ctx->log->debug("File '$full_path' not found for action $self") if $ctx->debug;
    return 0;
  }



( run in 3.347 seconds using v1.01-cache-2.11-cpan-524268b4103 )