On Sep 22, 9:47 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote:
> Have you seen what the perlsub manpage has to say about "Overriding
> Built-in Functions"?
>
>    http://perldoc.perl.org/perlsub.html#Overriding-Built-in-Functions-bu...
>
> It should be possible, even if it's not a good idea. Good luck with it!

No I haven't, but I've read the Camel book instead :-)


On Sep 23, 12:01 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
> So a function like 'open' can be overridden:
>
> $ perl -le' print prototype "CORE::open"'
> *;$@
>
> But it looks like 'defined' cannot:
>
> $ perl -le' print prototype "CORE::defined"'

Thanks, I didn't know that functions whose arguments cannot be
expressed by a prototype couldn't be overridden.


On Sep 23, 12:10 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
> "use subs" doesn't seem to work on defined(). OTOH, you can call the
> function with the ampersand or with a fully qualified name.
>
>      &defined();
>
>      main::defined();

Thanks for the tip!


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


Reply via email to