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.
In reply to Re^2: How relevant is the order of 'use's ?
by Anonymous Monk
in thread How relevant is the order of 'use's ?
by Krambambuli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |