David wrote:
>
> i am not aware of any module that masks Perl functions. you can create your
> own though.
>
> sub main::open{
>
> [snip]
perldoc perlsub
[snip]
Overriding Built-in Functions
Many built-in functions may be overridden, though this
should be tried only occasionally and for good reason.
Typically this might be done by a package attempting to
emulate missing built-in functionality on a non-Unix sys�
tem.
Overriding may be done only by importing the name from a
module--ordinary predeclaration isn't good enough. How�
ever, the `use subs' pragma lets you, in effect, prede�
clare subs via the import syntax, and these names may then
override built-in ones:
use subs 'chdir', 'chroot', 'chmod', 'chown';
chdir $somewhere;
sub chdir { ... }
To unambiguously refer to the built-in form, precede the
built-in name with the special package qualifier `CORE::'.
For example, saying `CORE::open()' always refers to the
built-in `open()', even if the current package has
imported some other subroutine called `&open()' from else�
where. Even though it looks like a regular function call,
it isn't: you can't take a reference to it, such as the
incorrect `\&CORE::open' might appear to produce.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]