Joshua Hoblitt wrote: > > > However the POSIX module is rather large and I think it's a rather > > > in-obvious place to look for a math function. > > > > I don't know; it's where I'd expect to see things which are in the > > "standard C library" (whatever that means) but aren't directly > > available as Perl functions. > > I'm only really interested in log10 - this is something that (I feel) > really should be a core function. As I said before, POSIX is a huge > module to load for just one common function.
Well, pedantically, you said "rather large". Does loading POSIX slow things down too much? I have often used it just for C<strftime> and haven't found that a problem. _If_ there is a general problem with POSIX being too large or slow then copying a single function into a separate module doesn't sound like a good general solution: there'd be people in equivalent positions with most of the other functions. Should there be a need to split POSIX into smaller chunks then I think that should be done in a careful rather than ad hoc manner. > I'd be willing to go with Math::Log10 and have nothing else in the > module if the namespace people don't object. On encountering a script that used such a module, I'd be rather irritated about having to download and install another Cpan module for something that can be achieved with a standard module that's already installed on the system. But I accept your point about POSIX not being an obvious place to look for many people (depending on background, how much is known about POSIX and C, etc). How about creating Math::Log10 as documentation only, referring to POSIX::log10? So people who don't know to look in POSIX will find it and then they will know to look in POSIX ... Smylers
