Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Is that anyway to override -X functions?

by exilepanda (Pilgrim)
on Sep 29, 2016 at 04:48 UTC ( #1172887=perlquestion: print w/replies, xml ) Need Help??

exilepanda has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

I've read the perldoc CORE, but it didn't mention if I can or cannot override -X (ie. -f, -d, -e etc). I tried this

BEGIN { no strict 'refs'; *{'CORE::GLOBAL::-f'} = sub { print "-f called"; } }
but this won't work. I am trying to build a set of functions that deals with Unicode dirs and files, while maintaining the native syntax. I can override chdir, readdir and sort of, but can't -X. Any clue ?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1172887]
Approved by BrowserUk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2020-02-24 00:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (104 votes). Check out past polls.

    Notices?