in reply to Re: Die On Warnings
in thread Die On Warnings

Can you explain the 1st two lines? They look like magic to me.
undef @config{@_}; $^H |= strict->import unless exists $config{'no_strict'};
Thanks --
rkg

Replies are listed 'Best First'.
Re: Re: Re: Die On Warnings
by antirice (Priest) on Sep 05, 2003 at 18:09 UTC

    The first two lines declare a hash and fill the hash with the elements of @_ as keys with each pointing to undef. The third line of the sub does a bitwise-or on $^H with the return of the default strict import unless "no_strict" was in @_. The first two lines are just a quick way of telling whether or not "no_strict" was present in the import list.

    In other words you control what operation gets performed from the import list. For more information I offer the following reading material: perldsc, use, Exporter, perlvar and perlmod.

    Hope this helps.

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1