Catalyst-Runtime

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Socket" : "1.96",
            "Stream::Buffered" : "0",
            "String::RewritePrefix" : "0.004",
            "Sub::Exporter" : "0",
            "Task::Weaken" : "0",
            "Text::Balanced" : "0",
            "Text::SimpleTable" : "0.03",
            "Time::HiRes" : "0",
            "Tree::Simple" : "1.15",
            "Tree::Simple::Visitor::FindByUID" : "0",
            "Try::Tiny" : "0.17",
            "URI" : "1.65",
            "URI::ws" : "0.03",
            "namespace::clean" : "0.23",
            "perl" : "5.008003"
         }
      },
      "test" : {
         "requires" : {
            "HTTP::Request::Common" : "0",
            "HTTP::Status" : "0",

META.yml  view on Meta::CPAN

  Socket: '1.96'
  Stream::Buffered: '0'
  String::RewritePrefix: '0.004'
  Sub::Exporter: '0'
  Task::Weaken: '0'
  Text::Balanced: '0'
  Text::SimpleTable: '0.03'
  Time::HiRes: '0'
  Tree::Simple: '1.15'
  Tree::Simple::Visitor::FindByUID: '0'
  Try::Tiny: '0.17'
  URI: '1.65'
  URI::ws: '0.03'
  namespace::clean: '0.23'
  perl: '5.008003'
resources:
  IRC: irc://irc.perl.org/#catalyst
  MailingList: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
  bugtracker: https://github.com/perl-catalyst/catalyst-runtime/issues
  homepage: https://github.com/perl-catalyst/catalyst-runtime
  license: http://dev.perl.org/licenses/

Makefile.PL  view on Meta::CPAN

        'HTTP::Request'         => '5.814',
        'HTTP::Response'        => '5.813',
        'Module::Pluggable'     => '4.7',
        'Path::Class'           => '0.09',
        'Scalar::Util'          => 0,
        'Sub::Exporter'         => 0,
        'Text::SimpleTable'     => '0.03',
        'Time::HiRes'           => 0,
        'Tree::Simple'          => '1.15',
        'Tree::Simple::Visitor::FindByUID' => 0,
        'Try::Tiny'             => '0.17',
        'Safe::Isa'             => 0,
        'Socket'                => '1.96',
        'Task::Weaken'          => 0,
        'Text::Balanced'        => 0, # core in 5.8.x but mentioned for completeness
        'MRO::Compat'           => 0,
        'MooseX::Getopt'        => '0.48',
        'String::RewritePrefix' => '0.004', # Catalyst::Utils::resolve_namespace
        'Devel::InnerPackage'   => 0, # No longer core in blead
        'Plack'                 => '0.9991', # IIS6+7 fix middleware
        'Plack::Middleware::ReverseProxy' => '0.04',

lib/Catalyst.pm  view on Meta::CPAN

use HTML::Entities;
use Tree::Simple qw/use_weak_refs/;
use Tree::Simple::Visitor::FindByUID;
use Class::C3::Adopt::NEXT;
use List::Util qw/uniq/;
use attributes;
use String::RewritePrefix;
use Catalyst::EngineLoader;
use utf8;
use Carp qw/croak carp shortmess/;
use Try::Tiny;
use Safe::Isa;
use Moose::Util 'find_meta';
use Plack::Middleware::Conditional;
use Plack::Middleware::ReverseProxy;
use Plack::Middleware::IIS6ScriptNameFix;
use Plack::Middleware::IIS7KeepAliveFix;
use Plack::Middleware::LighttpdScriptNameFix;
use Plack::Middleware::ContentLength;
use Plack::Middleware::Head;
use Plack::Middleware::HTTPExceptions;

lib/Catalyst.pm  view on Meta::CPAN

Please not you may also call the ->inject_components application method as well, although
you must do so BEFORE setup.

=back

=head1 EXCEPTIONS

Generally when you throw an exception inside an Action (or somewhere in
your stack, such as in a model that an Action is calling) that exception
is caught by Catalyst and unless you either catch it yourself (via eval
or something like L<Try::Tiny> or by reviewing the L</error> stack, it
will eventually reach L</finalize_errors> and return either the debugging
error stack page, or the default error page.  However, if your exception
can be caught by L<Plack::Middleware::HTTPExceptions>, L<Catalyst> will
instead rethrow it so that it can be handled by that middleware (which
is part of the default middleware).  For example this would allow

    use HTTP::Throwable::Factory 'http_throw';

    sub throws_exception :Local {
      my ($self, $c) = @_;

lib/Catalyst/ScriptRunner.pm  view on Meta::CPAN

package Catalyst::ScriptRunner;
use Moose;
use FindBin;
use lib;
use File::Spec;
use Class::Load qw/ load_first_existing_class load_optional_class /;
use Catalyst::Utils;
use Try::Tiny;
use namespace::clean -except => [ 'meta' ];

sub find_script_class {
    my ($self, $app, $script) = @_;
    return load_first_existing_class("${app}::Script::${script}", "Catalyst::Script::$script");
}

sub find_script_traits {
    my ($self, @try) = @_;

t/aggregate/unit_core_script_run_options.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use FindBin qw/$Bin/;
use IO::Handle;
use Try::Tiny;
use File::Temp qw/ tempfile /;
use lib "$Bin/../lib";

use_ok('Catalyst::ScriptRunner');
use_ok('ScriptTestApp');

is ScriptTestApp->run_options, undef;

my ($fh, $fn) = tempfile();

t/aggregate/unit_core_script_server-without_modules.t  view on Meta::CPAN

use strict;
use warnings;
use FindBin qw/$Bin/;

# Package::Stash::XS has a weird =~ XS invocation during its compilation
# This interferes with @INC hooks that do rematcuing on their own on
# perls before 5.8.7. Just use the PP version to work around this.
BEGIN { $ENV{PACKAGE_STASH_IMPLEMENTATION} = 'PP' if $] < '5.008007' }

use Test::More;
use Try::Tiny;

my %hidden = map { (my $m = "$_.pm") =~ s{::}{/}g; $m => 1 } qw(
    Starman::Server
    Plack::Handler::Starman
    MooseX::Daemonize
    MooseX::Daemonize::Pid::File
    MooseX::Daemonize::Core
);
local @INC = (sub {
  return unless exists $hidden{$_[1]};

t/aggregate/unit_core_script_server.t  view on Meta::CPAN

use strict;
use warnings;

use FindBin qw/$Bin/;
use lib "$Bin/../lib";

use File::Temp qw/ tempdir /;
use Cwd;
use Test::More;
use Try::Tiny;

use Catalyst::Script::Server;

my $cwd = getcwd;
chdir(tempdir(CLEANUP => 1));

my $testopts;

# Test default (no opts/args behaviour)
# Note undef for host means we bind to all interfaces.

xt/author/http-server.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More tests => 1;
use Test::TCP;

use File::Path;
use FindBin;
use Net::EmptyPort qw(wait_port empty_port);
use Try::Tiny;
use Plack::Builder;
use lib 't/lib';
use MakeTestApp;

# Run a single test by providing it as the first arg
my $single_test = shift;

my $test_app_dir = make_test_app;

# spawn the standalone HTTP server



( run in 1.100 second using v1.01-cache-2.11-cpan-05444aca049 )