[Handel] plugin for checkout

Christopher H. Laco claco at chrislaco.com
Fri Aug 18 14:43:41 CEST 2006


Jan Gerene wrote:
> Op maandag 14 augustus 2006 17:35, schreef Christopher H. Laco:
> 
>> package MyController;
>> sub foo : Local {
>> 	my ($self, $c) >>
>> 	my $stash >> 	$stash->{'catalyst'} >>
>> 	my $checkout >> 	...
>> 	$checkout->process;
>> };
>>
>> ...within the plugin....
>>
>> package MyPlugin;
>> sub handler {
>> 	my ($self, $ctx) >> 	my $catctx >> 	...
>> };
> 
> Chris, 
> 
> this does not work since $checkout->process calls $stash->clear before calling 
> the plugins (at least in version 0.33)
> 
> Best Regards,
> 

So it does. There's another way.

my $checkout $checkout->{'catalyst'} 

Since each plugin get's $ctx, which is the checkout instance, you should
be able to use $ctx->{'catalyst'} in your plugins. Untested of course.

-=Chris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.rawmode.org/pipermail/handel/attachments/20060818/212dff91/attachment.pgp 


More information about the Handel mailing list