Re: Define a error handler for a module
by Torsten Werner other posts by this author
Jan 9 2008 4:38AM messages near this date
Re: Define a error handler for a module
|
Q: PerlApp to incorporate Digital Signature capabilities
Hi Jenda,
it is exactly what I was looking for.
Sorry, I used the wrong mail group.
Thank you.
Torsten Werner
________________________________________________________
assyst Gesellschaft für Automatisierung Software und Systeme mbH
Max-Planck-Strasse 3
D - 85609 Aschheim-Dornach
Tel.: +49 89 90 505 0
Fax.: +49 89 90 505 271
e-mail: info@[...].com
http://www.assyst-bullmer.com
Registergericht München, HRB 76628
Steuer-Nr. 804 / 62242
USt-ID DE 129289972
Geschäftsführender Gesellschafter: Thomas Heinrichs
________________________________________________________
"Jenda Krynicky"
<Jenda@[...].cz> To: PDK@[...].com
Sent by: cc:
pdk-bounces@[...].Acti Subject: Re: Define a error handler for
a module
veState.com
09.01.2008 13:04
From: Torsten.Werner@[...].com
> Hi all,
> I'm looking in the documentation, but I can't find a way to set a
parameter
> for a module during 'use {module} ...'.
>
> I've a special error handler in a module 'module_a'. In a other module
> 'module_b' I have a default error handler. I would like overwrite the
error
> handler of 'module_b' by the error handler of 'module_a' if 'module_b' is
> used by 'module_a'. In any other case I would like leave the handler of
> 'module_b' untouched.
>
> 'module_b' has a few helper functions, it does not define a class. Any
> error handler has exactly the same definition (sub onError($$$);)
>
> Which possibilities do I have?
> Thanks a lot
> Torsten Werner
I don't see how it relates to PDK.
I think what you want is something like
package module_a;
use module_b;
...
sub module_b::onError {
...
}
...
That is as soon as you load module_a it will overwrite module_b's
subroutine onError.
Did I understand you right?
Jenda
===== Jenda@[...].cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
_______________________________________________
PDK mailing list
PDK@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
PDK mailing list
PDK@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Torsten Werner
Jenda Krynicky
Torsten Werner
|