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

Sergio Salvi sergio at salvi.ca
Thu Mar 18 17:50:43 PDT 2010


Talk about *clean* code :-P

On Thu, Mar 18, 2010 at 6:12 PM, Uri Guttman <uri at stemsystems.com> wrote:
>>>>>> "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 ---------
> _______________________________________________
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm
>


More information about the toronto-pm mailing list