I'm wondering if there is essentially no difference between doing: sub DOMAIN_PORT() { 53 } and use constant DOMAIN_PORT => 53; Is there any difference at all ?
AFAIK not really, other than that constant does some checks on the constant names and that it keeps track of declared constants in %constant::declared - but they should both produce a constant function. (Even today you can still find the line *$full_name = sub () { $scalar }; in constant.pm.)
In reply to Re^3: How to redefine a modules private function?
by haukex
in thread How to redefine a modules private function?
by sectokia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |