Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: How relevant is the order of 'use's ?

by Anonymous Monk
on Oct 20, 2016 at 14:21 UTC ( [id://1174368]=note: print w/replies, xml ) Need Help??


in reply to Re: How relevant is the order of 'use's ?
in thread How relevant is the order of 'use's ?

That's not exactly what constant does, it does this:

use Data::Dump qw/pp/; use constant { C1 => 10 }; sub C2 () { 20 } say pp $::{C1}; say pp $::{C2}; __END__ \10 \20

The empty prototype allows for inlining. See Constant Functions.

Replies are listed 'Best First'.
Re^3: How relevant is the order of 'use's ?
by Eily (Monsignor) on Oct 20, 2016 at 14:38 UTC

    Oh right, I forgot the prototype! Thanks :).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (8)
As of 2024-04-18 14:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found