Redefining subs without warnings.

By Steven Lembark (‎Lembark‎) from stlouis.pm
Lightning talk
Target audience: Lightning
Language:


The ability to override subroutines at runtime can be handy. Just assign a subref to *oldname and the public subroutine is udpated. This is even easier now with Symbol: you don't even need to turn off strict.

The assignment causes a warning, however, that can cause problems. The solution is to remove the old one first.


Perl Sites : perl | books | dev | history | jobs | learn | lists | use   
Yet Another Perl Conference North America