Adding Perl modules?
Jeremy Nicoll - ml gip
jn.ml.gti.91 at wingsandbeaks.org.uk
Tue Dec 7 03:10:10 PST 2021
On 2021-12-07 06:39, David Taylor wrote:
> I would like to add the Win32::API to the Perl which comes with
> get_iplayer.
> Is that possible?
I don't know. When I used get_iplayer I chose not to use its installer,
but
to install my own distribution of perl and then the extra modules it
needed,
so as to be "in charge" of perl on my own machine.
Otherwise if I'd wanted to use perl for anything else I'd have needed to
have
"my perl" and the g_ip one separately installed (so that the latter
could be
changed when g_ip needed it, without impacting on my own one).
After doing the perl install and checking it had worked, which I did by
issuing
perl -h
from a normal windows command window, which produced sensible output, I
then did
cpan App::cpanminus
which uses the "cpan" command to get a module from http://www.cpan.org/
(the Comprehensive Perl Archive Network). I'd read somewhere that
"cpanminus" is a wrapper for cpan which makes "cpan" easier to use, but
clearly had to use "cpan" to get that.
Issuing such a command basically attempts to fech, install and test a
module.
For me, with perl installed at a system level for every user, with eg
perl binary folders placed on PATH, this worked. It might be trickier
if the g_ip version of perl isn't pathed. Perhaps you can run the
equivalent commands by CD into one of the perl directories and then
run commands from there?
I then issued cpanm commands for every module I knew I used (IIRC there
was a list of them in the g_ip install notes for people not using the
installers). So for example:
C:\>cpanm Authen::SASL
Authen::SASL is up to date. (2.16)
would show me that an attempt to install the most recent version of
Authen::SASL was unneeded because I already had it, whereas an
earlier attempt (on a different machine)
C:\>cpanm Authen::SASL
--> Working on Authen::SASL
Fetching
http://www.cpan.org/authors/id/G/GB/GBARR/Authen-SASL-2.16.tar.gz ...
FAIL
! Download
http://www.cpan.org/authors/id/G/GB/GBARR/Authen-SASL-2.16.tar.gz
failed. Retrying .
..
! Download
http://www.cpan.org/authors/id/G/GB/GBARR/Authen-SASL-2.16.tar.gz
failed. Retrying .
..
! Download
http://www.cpan.org/authors/id/G/GB/GBARR/Authen-SASL-2.16.tar.gz
failed. Retrying .
..
! Failed to download
http://www.cpan.org/authors/id/G/GB/GBARR/Authen-SASL-2.16.tar.gz
! Failed to fetch distribution Authen-SASL-2.16
C:\>
For that one, I've no idea why the download failed, but I subsequently
grabbed the file
with a browser then used
C:\>cpanm "C:\Documents and Settings\XXX\My
Documents\Downloads\Authen-SASL-2.16.tar.gz"
--> Working on C:\Documents and Settings\XXX\My
Documents\Downloads\Authen-SASL-2.16.tar.gz
Fetching file://C:/Documents and Settings/XXX/My
Documents/Downloads/Authen-SASL-2.16.tar.g
z ... OK
Configuring Authen-SASL-2.16 ... OK
Building and testing Authen-SASL-2.16 ... OK
Successfully installed Authen-SASL-2.16
1 distribution installed
C:\>
I don't know if that's helpful.
--
Jeremy Nicoll - my opinions are my own
More information about the get_iplayer
mailing list