On Jun 24, 2004, at 11:55 PM, Daniel Kasak wrote:

Hi all.

I have an object that I want to have execute some code that it gets told about when it's constructed.
How do I go about that?


ie:
$self->{some_code_to_execute}

will either have the name of a sub, or a reference to a sub, or something.

I believe you can use:

$self->{sub_reference}->( @params );

A name only is a soft reference and will not pass strictures, as usual.

Hope that helps.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to