- path parts and chain base actions are parameterizable
- action names are parameterizable
- fixed parameterized role target meta object bug
+ - dispatch type mutabilisation for manipulation now done more
+ sanely (Tomas Doran).
+ - fixed M:I requirement handling for authors.
[0.010] Sun Sep 13 15:52:01 CEST 2009
- Fix Compat with MooseX::Method::Signatures >=0.22 ( KENTNL )
use inc::Module::Install;
-# required for authors:
-# Module::Install::ProvidesClass >= 0.000001_99
-# Module::Install::AutoManifest
-# Module::Install::ReadmeFromPod
-# Module::Install::AuthorTests
+BEGIN {
+ if ($Module::Install::AUTHOR) {
+
+ "Module::Install::$_"->can('can')
+ or die "Module::Install extension Module::Install::$_ is required for authors"
+ for qw(
+ AuthorTests
+ AutoManifest
+ ReadmeFromPod
+ ProvidesClass
+ );
+
+ Module::Install::ProvidesClass->VERSION('0.000001_99');
+ }
+}
name 'CatalystX-Declare';
author 'Robert Sedlacek <rs@474.at>';
requires 'MooseX::AttributeHelpers', '0.21';
requires 'MooseX::Declare', '0.30';
requires 'MooseX::MethodAttributes', '0.16';
-requires 'MooseX::Parameterized', '0.13';
+requires 'MooseX::Role::Parameterized', '0.13';
requires 'MooseX::Types', '0.20';
requires 'MooseX::Method::Signatures', '0.26';
requires 'FindBin';
return
if $type->DOES(ChainTypeSensitivity);
- # FIXME this is ugly as hell
my $immutable = $type->meta->is_immutable;
- $type->meta->make_mutable
- if $immutable;
+ my %immutable_options;
+ if ($immutable) {
+ %immutable_options = $type->meta->immutable_options;
+ $type->meta->make_mutable;
+ }
+
+ # FIXME we really shouldn't have to tweak the dispatch type
ChainTypeSensitivity->meta->apply($type->meta);
- $type->meta->make_immutable
+
+ $type->meta->make_immutable(%immutable_options)
if $immutable;
}
is get('/param/somebase/someaction'), 'someaction action', 'dynamic action name';
is get('/param/somebase/actionalias'), 'someaction action', 'dynamic action name in method call';
is get('/param/somebase/SOMEPART'), 'upper as SOMEPART under somebase', 'value prepared at runtime in role body';
+is get('/param/somebase/short/foo'), 'short foo', 'dynamic base in shortcut declaration';
done_testing;
final action upper as $upper_part under $base {
$ctx->response->body("upper as $upper_part under $base");
}
+
+ final action short <- $base (Str $x) {
+ $ctx->response->body('short ' . $x);
+ }
}