Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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
Replies are listed 'Best First'.
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 examining the Monastery: (21)
As of 2015-07-28 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls