Home > Archive > PERL Beginners > November 2005 > Perl libraries.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Nilay Puri 2005-11-24, 3:56 am |
| Hi All,
If on a server there perl documentation is present for DBI, does that
mean DBI is also installed.
My confusion is: on running the script to search for installed modules
not a single module is listed.
#!/usr/bin/perl
use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || "???";
print "$module -- $version\n" ;
}
But perldoc DBI gives result.
Thanks,
Nilay
| |
| John Doe 2005-11-24, 7:56 am |
| Nilay Puri, Noida am Donnerstag, 24. November 2005 10.22:
> Hi All,
Hi
> If on a server there perl documentation is present for DBI, does that
> mean DBI is also installed.
No.
The doc is installed with the module. But nothing prevents from deleting the
module or just installing the doc.
> My confusion is: on running the script to search for installed modules
> not a single module is listed.
You can look for modules by hand, for example with
$ find /usr/lib/perl5/ -name DBI.pm
Or (more reliable) you can check if modules are installed by trying to load
them:
$ perl -le 'use strict; use warnings; use DBI;'
If no error occurs, the module is installed.
> #!/usr/bin/perl
> use ExtUtils::Installed;
> my $instmod = ExtUtils::Installed->new();
> foreach my $module ($instmod->modules()) {
> my $version = $instmod->version($module) || "???";
> print "$module -- $version\n" ;
> }
> But perldoc DBI gives result.
hth
joe
| |
| Eden Cardim 2005-11-24, 6:56 pm |
| perlmodinstall recommends:
perl -MSome::Module -e 1
to check module installation
|
|
|
|
|