Glib constants as barewords



Hello everyone,

I had a quick question about the reason for using Glib constants vs declaring your own. I could do this:

use Glib qw/TRUE FALSE/;

or I could do this:

my ($TRUE, $FALSE) = (1, 0);

The second way would have the advantage of not being a bareword and being clearly defined in the code. What reasons are there to use the Glib way, especially if I'm not directly using anything from Glib?

oldtechaa

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]