Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by bpphillips (Friar)
on Feb 23, 2011 at 16:19 UTC ( #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
Node Status?
node history
Node Type: note [id://889820]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-08-17 12:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (178 votes). Check out past polls.

    Notices?