Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: disambiguating require (or: require loves barewords )

by Anonymous Monk
on Jul 23, 2013 at 13:09 UTC ( [id://1045852]=note: print w/replies, xml ) Need Help??


in reply to Re: disambiguating require (or: require loves barewords )
in thread disambiguating require (or: require loves join more than catfile)

$ perl -f -we " use File::Spec::Functions; my $x=q{x}; require catfile +($x,catfile($x,$x)) " syntax error at -e line 1, near "require catfile(" Execution of -e aborted due to compilation errors. $ perl -f -we " use File::Spec::Functions; my $x=q{x}; require scalar( +catfile($x,catfile($x,$x))) " Can't locate x\x\x in @INC

catfile isn't a builtin, scalar is a builtin, so perl knows scalar isn't a bareword, but it thinks catfile is a bareword :)

Replies are listed 'Best First'.
Re^3: disambiguating require (or: require loves barewords )
by Anonymous Monk on Jul 23, 2013 at 13:10 UTC
    bareword as in modulename

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1045852]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-03-28 14:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found