in reply to Re: Entry Widget - validatecommand
in thread Entry Widget - validatecommand
...sub print { print $value unless $value eq '-'; }
Incidentally, why does this print sub [not] simply call itself recursively??
Its a namespace problem (feature? artifact?). Your new print is defined in main and the built-in print is defined in CORE and the CORE namespace has search precedence. Try the following:
>perl -wMstrict -le "sub print { CORE::print('foo') } ::print; " foo >perl -wMstrict -le "sub print { ::print('foo') } ::print; " Deep recursion on subroutine "main::print" at -e line 1. Terminating on signal SIGINT(2)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Entry Widget - validatecommand
by Athanasius (Archbishop) on Jul 24, 2012 at 08:47 UTC |