Rick Measham schreef:
> Can't use a block eval for 'use X'. All 'use X' commands are parsed before
> anything else, so it will always try to use X, even if we don't go there.

Yes, of course, stupid me.

> 'require X' happens at run-time so doesn't need to be eval-ed.

Except if you want to catch the error if the module isn't installed.

> BUT, does
> 'require' do all that I need it to do? I know it doesn't import for one.

perldoc -f use. 'use' is exactly equivalent to

    BEGIN { require Module; import Module LIST; }

> > Before I forget: the file had MS-DOS line endings, and no EOL on the
> > last line. this confused my vi.
> 
> ROFL! I'm creating this on a mac with unix line endings. Maybe my mail
> program changed it! Hmm .. maybe I should send it some other way.

No, my mistake again. They were probably mac line endings, but I don;'t
encounter them enough to recognize them.

Eugene

Reply via email to