On Sat, May 10, 2008 at 06:23:06PM +0100, Lyle wrote:

> My software ends up on a wide variety of hosts, Linux, BSD, Windoze, you 
> name it. A lot of my customers are on shared hosting where they 
> generally aren't in a position to add new perl modules or server 
> features.

They can upload modules to sub-directories under their cgi-bin (or
similar) and use them, provided they just 'use lib qw(blah)' first.

> David Cantrell wrote:
> > Class::DBI or DBIx::Class.  Personally I prefer Class::DBI but its
> > internals are nasty and DBIx::Class seems to have more active...
> Interesting. But for my purposes I generally try to stick to pure Perl 
> modules ...

I *think* that DBIx::Class itself is pure perl - at least, the MANIFEST
doesn't contain any .xs or .c files.  And DBI comes with DBI::PurePerl.
I've not checked its other dependencies.

The problem will be finding a pure perl DBD.  Off the top of my head the
only ones are AnyData, RAM, and CSV.  None of which are much help with
talking to a real database!  OTOH, it's not too unreasonable to expect
that a hostingco that has installed MySQL and perl will have also
installed DBD::Mysql, and one that has installed perl on Windows will
normally have Win32::* intsalled and perhaps some ODBC modules.

> Strangely enough that brings me on to the CPAN dependencies lookup 
> feature... Can't for the life of me remember who maintains that :P
> It would be REALLY useful if it showed which dependencies were pure Perl 
> and which used XS and alike.

It could only ever be a heuristic, of course, but does this sound like a
close enough approximation?

A module (actually a distribution) is pure perl if:
  it contains no .c, .h or .xs files;
  and it doesn't depend on Inline::C
or:
  it contains a /pureperl/i file

I'd look filenames up in the MANIFEST files on search.cpan.org.  The
extra fetch needed from seaerch.cpan and all the extra checks would make
it quite a bit slower, so this would have to be an option that you have
to turn on yourself.

And of course if a module is available in the same distribution in both
C-ish and pure perl versions, I won't be able to tell from the test
results whether it'll actually work for you.

This definitely sounds like a good feature to add.  [scribble scribble]
there, added to the TODO list.  Of course, it'll get done faster if you
can supply a patch :-)  The CVS repository is here:
  http://drhyde.cvs.sourceforge.net/drhyde/perlcpandeps/

-- 
David Cantrell | Enforcer, South London Linguistic Massive

Arbeit macht Alkoholiker
_______________________________________________
BristolBathPM mailing list
[email protected]
http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm

Reply via email to