jg has asked for the wisdom of the Perl Monks concerning the following question:
Sometimes a whole package is too big just for some constant values, because it just consume the memory without use of any other values. especially for a long-time-running program.
So, I just try code like following..
# I just want to know WNOHANG from sys_wait_h ... [-; our $WNOHANG_VALUE ||= `$^X -MPOSIX=:sys_wait_h -e "print WNOHANG;"`; sub WNOHANG () { $WNOHANG_VALUE }
Is there any other way to do this?
Btw, I just want to know her thought like this..
not from after all the long and rediculus conversation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get just constant from a package.
by JavaFan (Canon) on May 14, 2010 at 14:41 UTC | |
by jg (Initiate) on May 14, 2010 at 22:27 UTC |