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?
In reply to Query about barewords by kevinp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |