[Catalyst] C::P::Email and testing

Daniel McBrearty danielmcbrearty at gmail.com
Mon Dec 18 21:31:00 GMT 2006


OK. That does work if I use :

$c->SUPER::email($c, @_);

to call the superclass.

Interestingly, if I use SUPER.pm ... :

package Catalyst::Plugin::EmailTestable;

use strict;
use warnings;
use base qw ( Catalyst::Plugin::Email );
use SUPER;

sub email {
  my $c = shift;
  my $super = $c->super('email');
  $c->log->dumper($super);

}

1;


and I get ... :

[debug] $VAR1 = sub { "DUMMY" };

and if I try

$super->($c, @_);

the app hangs. Is this a known problem?

cheers

D



On 12/18/06, Jonathan Rockway <jon at jrock.us> wrote:
>
>
> Daniel McBrearty wrote:
> > ... but I'm thinking, how can one plugin inherit from another? $self
> > isn't passed ...
>
> Your plugin ISA Catalyst, so instead of $self, you get a $c.
> Subclassing should work.  $c->next::method(@_) or whatever;
>
> --
> package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
> $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
> ";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>


-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Catalyst mailing list