in reply to Re: Re: Calling SUPER in MethodMaker-generated methods
in thread Calling SUPER in MethodMaker-generated methods
Actually, the eval is trapping the error. When I put a die $@ if $@; after the eval, it propagates the same error. I haven't tried using the string form of eval but I don't expect that to work any better than the block eval (though it might if it forces perl to bind SUPER at run time, and thus bind it to the base class instead of CustomMethodMaker, which is why I thought to try eval in the first place).
The reason it works without Class::MethodMaker is (near as I can tell, anyway) that you're creating the sub in the same class for which you want to find the super class. In other words, it might be that if you wrote a third class that installs the method (in which SUPER is called) into the base class, it wouldn't work.
It's also possible that the error is actually being generated somewhere else in the call chain when the required method is called. I didn't have time to do a full trace of the code earlier. Creating a simple test module that installs the SUPER-calling method into the example which doesn't use Class::MethodMaker would tell you if the issue is actually with using SUPER outside the base class, though, so that's maybe a good avenue to explore.
Sorry I can't look into it any more right now. I'm at school and don't have access to Perl. :(
HTH, anyway.
bbfu
Black flowers blossom
Fearless on my breath
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re3: Calling SUPER in MethodMaker-generated methods
by danb (Friar) on Jul 08, 2003 at 22:39 UTC | |
by bbfu (Curate) on Jul 09, 2003 at 04:02 UTC | |
by danb (Friar) on Jul 09, 2003 at 07:48 UTC | |
by bbfu (Curate) on Jul 09, 2003 at 15:15 UTC | |
by danb (Friar) on Jul 09, 2003 at 17:42 UTC | |
| |
by danb (Friar) on Jul 09, 2003 at 06:35 UTC | |
by danb (Friar) on Jul 08, 2003 at 23:03 UTC |