Perl: the Markov chain saw | |
PerlMonks |
Re^2: Wrapping the open() built-inby almut (Canon) |
on Oct 27, 2006 at 15:37 UTC ( [id://580940]=note: print w/replies, xml ) | Need Help?? |
I deliberately chose to use CORE::GLOBAL in my specific case (despite the unless-you-know-what-you're-doing type of warnings in "Overriding Built-in Functions", Chap 11.3, the Camel Book). Only having a vague idea of what the existing code1 looks like, I thought that, all in all, I might be better off replacing the built-ins globally. As I understand it, Exporter does only export into a specific namespace, e.g. _____ MySystem.pm _____
_____ test.pl _____
would print
i.e. the second call of system() is not being wrapped... I'd rather not have to take care of such subleties (not all that sure I'm not getting myself into other subtleties this way, though... ;) Could you elaborate on why not to use CORE:: ? Almut _____ 1 as I mentioned in Using literal Japanese filenames in legacy CP932 encoding with system(), etc., the idea behind writing a jperl compatibility module is that the large number of existing scripts wouldn't need to be touched
In Section
Seekers of Perl Wisdom
|
|