Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: SUPER delegation fails because class name getting munged (somehow?)

by bpphillips (Friar)
on Feb 23, 2011 at 16:19 UTC ( [id://889820]=note: print w/replies, xml ) Need Help??


in reply to Re: SUPER delegation fails because class name getting munged (somehow?)
in thread SUPER delegation fails because class name getting munged (somehow?)

Sure, it's very straightforward:

$c->stash->{constant} = MyCompany::Pages::TemplateConstants->new($arg) +; # this is in Catalyst
  • Comment on Re^2: SUPER delegation fails because class name getting munged (somehow?)
  • Download Code

Replies are listed 'Best First'.
Re^3: SUPER delegation fails because class name getting munged (somehow?)
by pajout (Curate) on Feb 23, 2011 at 16:26 UTC
    It looks good, I suspect static '::new' style with somehow munged first arg, but 'MyClass::MySubClass->new($args)' should be equivalent to 'MyClass::MySubClass::new("MyClass::MySubClass",$args)' (if method 'new' is implemented in MySubClass).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://889820]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found