Shlomi Fish <shlo...@iglu.org.il> wrote on 04/08/2010 08:37:10 PM:
> > Uh, what are you really trying to do?  There are helper modules that 
make
> > using attributes much easier.
> 
> Yes, I'm wondering about it too.

I'm trying to use method attributes to get a certain behaviour with some 
syntactic sugar. Like, for example:

---%<---
sub do_heavy_work :Forks {
        return heavy_thinking();
}
--->%---

... getting this one to fork. I have the surrounding stuff already, i.e. a 
certain accessor method that takes the name of the instance method as 
parameter and calls it in the fashion of 
"$instance->$method_name(@params)". I'd like to check in the accessor 
method whether the sub I'm about to call has the ":Forks" attribute and do 
a fork before actually calling it if it has.

TIA,
                        Eric

--
Eric MSP Veith <eric.ve...@de.ibm.com>
Hechtsheimer Str. 2
DE-55131 Mainz
Germany

IBM Deutschland GmbH
Vorsitzender des Aufsichtsrats: Erich Clementi
Geschäftsführung: Martin Jetter (Vorsitzender), Reinhard Reschke, 
Christoph Grandpierre, Matthias Hartmann, Michael Diemer, Martina 
Koederitz
Sitz der Gesellschaft: Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 14562
WEEE-Reg.-Nr. DE 99369940

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to