Workman has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I can't figure out how to install the DBD::Anydata on winXP. AnyData is working fine on it's own (the test.pl runs) but when I try to add the DBD part using various contortions, it clobbers Anydata. I downloaded DBD-AnyData-0.09.tar.gz and expected to see a file named DBD_AnyData.pm or something like that, and expected it would reference AnyData.pm but it just includes another AnyData.pm which... well, that's where I'm confused... This is my first PERL question. It's 2:20am. I hope I'm not staring the answer in the face and can't see it.

Replies are listed 'Best First'.
Re: Installing DBD::Anydata
by afoken (Chancellor) on Jun 14, 2009 at 07:14 UTC

    Use the cpan script to install the module, like any other modules:

    cpan DBD::AnyData

    Yes, that's all you need. It cares about dependancies, manual pages, scripts, unit tests, and so on.

    Don't try to copy files from arbitary archives anywhere on your harddisk. Perl modules aren't installed that way. For some pure-perl modules, copying may work, but with XS modules, you will fail.

    Behind the scenes, cpan calls Makefile.PL or Build.PL, then make, make test, and finally make install, with make replaced by whatever make program was used to compile perl.

    The reason why yo don't see a file named DBD_AnyData.pm is that the correct filename is AnyData.pm in a directory named DBD.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Thanks to all for the replies. cpan DBD::Anydata worked like a charm.
Re: Installing DBD::Anydata
by CountZero (Bishop) on Jun 14, 2009 at 06:43 UTC
    Did you try installing it though the CPAN-tool?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Installing DBD::Anydata
by syphilis (Archbishop) on Jun 14, 2009 at 09:24 UTC
    AnyData is working fine on it's own (the test.pl runs) but when I try to add the DBD part using various contortions, it clobbers Anydata

    The AnyData.pm that you installed first will, if installed correctly, be in the perl/site/lib folder. When DBD-AnyData is correctly installed, the AnyData.pm that ships with it will be placed in the perl/site/lib/DBD folder - and will thus not clobber the AnyData.pm that was installed earlier.

    You could even place DBD/AnyData.pm in perl/site/lib by hand, if you liked, but it's better to get on top of the correct ways to install modules as many modules are not so easy to install "by hand".

    Cheers,
    Rob