X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FComponent%2FRole%2FCaptureApp.pm;fp=lib%2FCatalyst%2FComponent%2FRole%2FCaptureApp.pm;h=205370e0fd1872c8792b2ac8be0a396e660c1b43;hb=9cc543bce15960f805772ee5cda084c5885f76f2;hp=0000000000000000000000000000000000000000;hpb=11ae73780599395627cb18dc95849ddcb0fce2ae;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Component/Role/CaptureApp.pm b/lib/Catalyst/Component/Role/CaptureApp.pm new file mode 100644 index 0000000..205370e --- /dev/null +++ b/lib/Catalyst/Component/Role/CaptureApp.pm @@ -0,0 +1,20 @@ +package Catalyst::Component::Role::CaptureApp; + +use Moose::Role; +use namespace::clean -except => 'meta'; + +# Future - isa => 'ClassName|Catalyst' performance? +# required => 1 breaks tests.. +has _application => (is => 'ro'); +sub _app { (shift)->_application(@_) } + +override BUILDARGS => sub { + my ($self, $app) = @_; + + my $args = super(); + $args->{_application} = $app; + + return $args; +}; + +1;