Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by pajout (Curate)
on Feb 23, 2011 at 16:10 UTC ( #889819=note: print w/ replies, xml ) Need Help??


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

Just stupid idea: Can you show the code piece containing calling of that 'new' method?

Update:

I suspect something like

use MyClass; my $obj = MyClass::new('MyBlass');


Comment on Re: SUPER delegation fails because class name getting munged (somehow?)
Download Code
Re^2: SUPER delegation fails because class name getting munged (somehow?)
by bpphillips (Friar) on Feb 23, 2011 at 16:19 UTC

    Sure, it's very straightforward:

    $c->stash->{constant} = MyCompany::Pages::TemplateConstants->new($arg) +; # this is in Catalyst
      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://889819]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2014-07-26 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls