On Sun, Jul 27, 2003 at 10:40:29PM -0700, Bryan Harris wrote:
>>> Is there a generally accepted way to get the "base" of a 
>>> filename [...] without using any modules?
>> 
>> Sure, that's fine -- but why don't you want to use modules?
>> 
>> File::Basename has been in the core distribution for a long 
>> time.
> 
> Maybe I just always felt that if you use modules, you lose 
> portability and the purity of the language.  Is that true?

Nope.

In fact, the modules are often *more* portable than ad-hoc code
to do the same thing.  For instance, File::Spec knows all about
the VMS filesystem.  CGI.pm knows how to spell CRLF in ebcidic.

There are lots of similar examples.

Yours isn't really one of them, though... :-)

> If a module is in the core distribution, why doesn't it get
> incorporated into the language itself?

Many languages depend on a "standard library".  Perl is no 
different.

It's a bit unusual in that lots of I/O and networking functions
*are* part of the language, but if all the core modules were
rolled into the language as well, you'd have thousands of new
keywords conflicting with everything and /usr/bin/perl would be
a 10MB colossus.

-- 
Steve :: "Hyperbole's bad, mkay?"

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to