[sf-perl] Help with a downloaded module

Michael Friedman friedman at highwire.stanford.edu
Sun Feb 24 14:42:47 PST 2008


Neil,

CPAN modules don't really stand on their own. They come in packages.  
If you follow CPAN's suggestion and do

cpan> i/TestReporter/
Distribution    C/CH/CHROMATIC/Module-Build-TestReporter-1.00.tar.gz
Module          Module::Build::TestReporter (C/CH/CHROMATIC/Module- 
Build-TestReporter-1.00.tar.gz)
2 items found


That tells you that it's part of "C/CH/CHROMATIC/Module-Build- 
TestReporter-1.00", as "Module::Build::TestReporter". You need that  
full "path" so that CPAN can find the module.

Knowing that, you can ask CPAN to install it by doing

cpan> install Module::Build::TestReporter

which should work better. Note that there are a number of  
prerequisites for this module, so it may start off by loading a pile  
of seemingly unrelated stuff, but it'll get to TestReporter at the end.

-- Mike

On Feb 24, 2008, at 2:06 PM, Neil Heller wrote:

> Thank you for the help.
> I tried installing the file as you mentioned but got only errors.
> The transcript follows.  Do you have any feeling for what my trouble  
> may be?
>
> [start install]
>
>
> C:\test\TestReporter>perl -MCPAN -e shell
> Exiting subroutine via last at C:/Perl/lib/CPAN.pm line 1450.
>
> cpan shell -- CPAN exploration and modules installation (v1.9205)
> ReadLine support enabled
>
>
> cpan> install TestReporter.pm
> CPAN: Storable loaded ok (v2.18)
> Use of uninitialized value $_ in transliteration (tr///) at
> C:/Perl/lib/File/Spe
> c/Win32.pm line 141.
> Use of uninitialized value $_ in pattern match (m//) at
> C:/Perl/lib/File/Spec/Wi
> n32.pm line 143.
> CPAN: LWP::UserAgent loaded ok (v2.036)
> CPAN: Time::HiRes loaded ok (v1.9711)
> Fetching with LWP:
>  http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz
> Going to read C:\Perl\cpan\sources\authors\01mailrc.txt.gz
> ............................................................................
> DONE
>
> Use of uninitialized value $_ in transliteration (tr///) at
> C:/Perl/lib/File/Spe
> c/Win32.pm line 141.
> Use of uninitialized value $_ in pattern match (m//) at
> C:/Perl/lib/File/Spec/Wi
> n32.pm line 143.
> Fetching with LWP:
>  http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz
> Going to read C:\Perl\cpan\sources\modules\02packages.details.txt.gz
>  Database was generated on Sun, 24 Feb 2008 11:30:42 GMT
> ............................................................................
> DONE
>
> Use of uninitialized value $_ in transliteration (tr///) at
> C:/Perl/lib/File/Spe
> c/Win32.pm line 141.
> Use of uninitialized value $_ in pattern match (m//) at
> C:/Perl/lib/File/Spec/Wi
> n32.pm line 143.
> Fetching with LWP:
>  http://ppm.activestate.com/CPAN/modules/03modlist.data.gz
> Going to read C:\Perl\cpan\sources\modules\03modlist.data.gz
> ............................................................................
> DONE
>
> Going to write C:\Perl\cpan\Metadata
> Warning: Cannot install TestReporter.pm, don't know what it is.
> Try the command
>
>    i /TestReporter.pm/
>
> to find objects with matching identifiers.
>
>
> cpan>
>
> [end install]
>
> Neil Heller
>
> -----Original Message-----
> From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org
> [mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf  
> Of
> Asheesh Laroia
> Sent: Sunday, February 24, 2008 12:10 PM
> To: San Francisco Perl Mongers User Group
> Subject: Re: [sf-perl] Help with a downloaded module
>
> On Sun, 24 Feb 2008, Neil Heller wrote:
>
>>
>> I'm a relative newbie at Perl.
>> I downloaded a module, TestReporter.pm, from CPAN.
>> On my Wintel machine I created a directory, c:\test\TestReporter.
>> I plopped the module (without change) into that directory and  
>> issued a
>> couple of command line calls.
>
> That's not the right way to install CPAN modules.
>
> Do you know about the CPAN shell?  Try this:
>
> perl -MCPAN -e shell
>
> That will give you a prompt at which you can ask it:
>
> install __name__of_module_you_want__
>
> -- Asheesh.
>
> -- 
> Do clones have navels?
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
>
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm

---------------------------------------------------------------------
Michael Friedman                     HighWire Press
Phone: 650-725-1974                  Stanford University
FAX:   270-721-8034                  <friedman at highwire.stanford.edu>
---------------------------------------------------------------------




More information about the SanFrancisco-pm mailing list