[tpm] What does this line of Perl code mean?

Uri Guttman uri at StemSystems.com
Thu Mar 18 15:12:04 PDT 2010


>>>>> "IS" == Indy Singh <indy at indigostar.com> writes:

  IS> What does the following line of code mean and why is it needed?
  IS> local $SIG{__WARN__} = \&dirty;

dirty() is a boolean test so that does nothing other than to quiet
warnings. they may be triggered in the eval or even elsewhere in this
module.
  IS> It is part of Acme::Bleach which is below.

  IS> For bonus points what is the purpose of $tie?

it is a whitespace marker that says whether this source file has been
bleached or not. dress() tests for it and whiten() prepends it to the
source. brighten (which unbleaches) removes the leading $tie.

uri

-- 
Uri Guttman  ------  uri at stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


More information about the toronto-pm mailing list