kevinp has asked for the wisdom of the Perl Monks concerning the following question:
While putting together some examples of using Gtk and Perl I came across the following behaviour which I hope someone can explain.
This piece of code complains of a BAREWORD under strict.
$switch->signal_connect( notify::active => \&toggle );As you would expect, if I add some quotes the code works with no complaints.
$switch->signal_connect( 'notify::active' => \&toggle );So - my question is - why does the following work and not complain about barewords.
$update_button->signal_connect ( clicked => \&update );It seems that Perl sees notify::active and clicked differently and that seems inconsistent to my mind.
Can someone explain the behaviour?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Query about barewords
by Athanasius (Archbishop) on Sep 06, 2012 at 14:25 UTC | |
by johngg (Canon) on Sep 06, 2012 at 15:23 UTC | |
by runrig (Abbot) on Sep 06, 2012 at 15:53 UTC | |
by tye (Sage) on Sep 06, 2012 at 17:12 UTC | |
by runrig (Abbot) on Sep 06, 2012 at 15:57 UTC | |
by johngg (Canon) on Sep 06, 2012 at 16:31 UTC | |
|
Re: Query about barewords
by remiah (Hermit) on Sep 06, 2012 at 16:52 UTC |