CatalystX-Imports

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

abstract: 'Shortcut functions for L<Catalyst> controllers'
author:
  - "Robert \"phaylon\" Sedlacek <rs@474.at>"
build_requires:
  Catalyst::Plugin::Session: 0
  Catalyst::Plugin::Session::State::Cookie: 0
  Catalyst::Plugin::Session::Store::FastMmap: 0
  Catalyst::Test: 0
  ExtUtils::MakeMaker: 6.42
  FindBin: 0
  HTTP::Request: 0
  Test::More: 0.62
  Test::WWW::Mechanize::Catalyst: 0
configure_requires:
  ExtUtils::MakeMaker: 6.42
distribution_type: module
generated_by: 'Module::Install version 0.85'
license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: 1.4

Makefile.PL  view on Meta::CPAN

requires        q{Scalar::Util},                '1.19';
requires        q{Catalyst::Runtime},           '5.80002';
requires        q{Data::Alias},                 '0.08';
requires        q{Class::C3},                   '0.20';
requires        q{Sub::Name},                   '0.04';

test_requires   q{Test::More},                                  '0.62';
test_requires   q{FindBin},                                     0;
test_requires   q{Catalyst::Test},                              0;
test_requires   q{Test::WWW::Mechanize::Catalyst},              0;
test_requires   q{HTTP::Request},                               0;
test_requires   q{Catalyst::Plugin::Session},                   0;
test_requires   q{Catalyst::Plugin::Session::State::Cookie},    0;
test_requires   q{Catalyst::Plugin::Session::Store::FastMmap},  0;

auto_provides;
WriteAll;

package MY;

sub postamble {

t/10-context-basic.t  view on Meta::CPAN

        name =>'prototype_test',
        code => sub {
            my ($library, $self, $c, $a_args, $code) = @_;
            return $code->();
        },
        prototype => '&',
    );
}

use Catalyst::Test 'TestApp';
use HTTP::Request;

my @test_data = (
    ['captures',        '/1/2/3/test_captures',     '1, 2, 3; 3'],
    ['action',          undef,                      'basic/test_action; basic/base; basic/base; Catalyst::Action'],
    ['uri_for',         undef,                      'http://localhost/3/4/5/test_captures/foo?x=7'],
    ['model',           undef,                      23],
    ['model w/ prefix', '/test_model_w_prefix',     'Prefix_Foo'],
    ['model w/ AC',     '/test_model_withac/1/2/3', '1, 2, 3'],
    ['response',        undef,                      1],
    ['request',         undef,                      1],

t/20-vars-basic.t  view on Meta::CPAN

#!perl
use warnings;
use strict;

use FindBin;
use lib "$FindBin::Bin/lib";

use Test::More;

use Catalyst::Test 'TestApp';
use HTTP::Request;

my @tests = (
    ['/test_self',                  'TestApp::Controller::Vars',    '$self contains correct object'],
    ['/test_ctx',                   'TestApp',                      '$ctx contains correct object'],
    ['/test_args/1/2/3',            '1, 2, 3',                      '@args contains correct arguments'],
    ['/test_stash',                 '23',                           'modifying stash works'],
    ['/test_array',                 '23, 42',                       'modifying array works'],
    ['/test_hash',                  '23',                           'modifying hash works'],
    ['/a/b/test_args_phases/1/2',   'a, b; 1, 2; x, y, z',          '@args in various stages'],
    ['/test_passed_args/1/2/3',     '1, 2, 3',                      'passed @args to other action'],



( run in 0.392 second using v1.01-cache-2.11-cpan-de7293f3b23 )