The delayed loading happens as you show, but even after the delayed load, the now-defined function still lacks a prototype:
use POSIX qw( CHAR_MAX ); BEGIN { my $x= CHAR_MAX(); } BEGIN { print defined(\&CHAR_MAX), $/; } for(qw( CHAR_MAX POSIX::CHAR_MAX )) { my $proto= prototype($_); $proto= "..." if ! defined $proto; print "$_($proto)\n"; } print CHAR_MAX, $/; print CHAR_MAX+1, $/; __END__ Produces: 1 CHAR_MAX(...) POSIX::CHAR_MAX(...) 127 127
- tye
In reply to Re^2: Beware of POSIX constants (sorta)
by tye
in thread Beware of POSIX constants
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |