On 1/16/2011 3:47 AM, Gabor Szabo wrote:
> In a new Padre 0.78 installation I get two warnings when launching Padre:
> ...
> So apparently both $SIG{__DIE__}, $HOME and $ENV{PADRE_HOME} are undef
> in this situation.
>
>
> We could write more code to eliminate the warnings (or we could say
> "no warnings")
> but I wonder:
> Why do we need to call "local" on the variables that are global to the
> whole application?

In my experience, good code should handle the case of
uninitialized variables and not just quiet the
warnings.  For example, $ENV{HOME} is not always
set (e.g., on windows machines) and applications
that assume it is set can break if it is not.

I thought one called local on perl global variables
precisely because they are global in scope and use
so one cannot be sure that changing them in one
part of the code/application will not break something
in another part of the code/application.

--Chris
_______________________________________________
Padre-dev mailing list
Padre-dev@perlide.org
http://mail.perlide.org/mailman/listinfo/padre-dev

Reply via email to