Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by pajout (Curate)
on Feb 23, 2011 at 16:10 UTC ( [id://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');

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://889819]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-03-29 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found