* Zefram <zefram@fysh.org> [2010-11-16 23:00]: > Father Chrysostomos via RT wrote: > >> use constant INIT => 4; > > There's a problem with this line: INIT, as a subroutine name, > is magic to Perl, and defining a constant in this way actually > amounts to defining a subroutine. If you change the name to > XNIT then nothing funny happens. It seems to me that `constant` should warn about this (as well as all the other special names (`BEGIN`, `END`, `CHECK` etc.)). For some reason I even feel it should maybe die… but since const subs aren’t likely to have any side effects I can’t find any reason to back up my gut feeling and it seems to fall under “give them rope”. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>Thread Previous