i list,

I'll swap from answering questions to asking question today.  Hopefully, I wouldn't be 
the only
person to learn something this way :)

Anyway, within some code (a module for CPAN actually), I want to write:

alarm $timeout
    unless not implemented("alarm");

which reads rather nicely.  This makes the module portable, since the alarm is a 'nice 
to have'
feature.  Making the implemented() function is a little harder.

I thought that the CORE psuedopackage would be enough, so I tried:

CORE->can("alarm");

which didn't do anything interesting.  Do I have to actually use the function, just to 
see if it
throws an error or not?  If so, how do I call an arbitary built-in... CORE::$func() 
doesn't appear
to work?

Probably I'll end up creating an xalarm() function, it'd be useful to be able to do 
this kind of
checking.  (fork/exec/shm/msg/chown... anyone?).

Jonathan Paton

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to