[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-AnyPerl] Multi Platform Scripts



At 11:54 -0400 1999.08.09, Ronald J Kimball wrote:
>On Mon, Aug 09, 1999 at 11:30:00AM -0400, Chris Nandor wrote:
>> At 11:07 -0400 1999.08.09, Ronald J Kimball wrote:
>> >On Mon, Aug 09, 1999 at 10:56:28AM -0400, Chris Nandor wrote:
>> >>
>> >> This isn't always ideal, because require/import is not exactly the
>>same as
>> >> use
>> >
>> >Could you clarify that statement?  I believe that use is exactly the same
>> >as require/import in a BEGIN block.
>>
>> Anything that needs to be done at compile time in the module won't be done
>> at compile time.
>
>Well, if you need conditional use at compile time, that's easy enough to
>do:
>
>BEGIN {
>  if ($^O eq 'MacOS') {
>    require Mac::StandardFile;
>    import Mac::StandardFile;
>  }
>}

Right, you can do it in a BEGIN, but what about the case where dselayed
execution forces you to not include it in a BEGIN?

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org