CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Modern::Perl on CygWin

 



rpaskudniak
User


Nov 21, 2017, 4:20 PM

Post #1 of 4 (628 views)
Modern::Perl on CygWin Can't Post

Perl 5.26 under CygWin

Hi y'all.

I am trying to get my feet wet with Perl::Modern (as a stepping stone to Moose). On my Linux box I had no trouble installing it. But in Cygwin I encounter all manner of tzuris Frown

I opened a CygWin shell window in administrator mode and tried to just install it directly with a CPAN command:

Code
$ cpan install Modern::Perl

Here is just the top lines of the output:

Code
Loading internal null logger. Install Log::Log4perl for logging messages 
CPAN: Storable loaded ok (v2.62)
Reading '/home/Rasputin/.cpan/Metadata'
Database was generated on Wed, 09 Sep 2015 22:53:27 GMT
CPAN: LWP::UserAgent loaded ok (v6.29)
CPAN: Time::HiRes loaded ok (v1.9741)
Fetching with LWP:
http://httpupdate1.cpanel.net/CPAN/authors/01mailrc.txt.gz
LWP failed with code[404] message[Not Found]

Trying with
/usr/bin/lynx -source
to get
http://httpupdate1.cpanel.net/CPAN/authors/01mailrc.txt.gz

No success, the file that lynx has downloaded is an empty file.
Warning: no success downloading '/home/Rasputin/.cpan/sources/authors/01mailrc.txt.gz.tmp66976'. Giving up on it.
Fetching with LWP:
http://httpupdate3.cpanel.net/CPAN/authors/01mailrc.txt.gz
LWP failed with code[404] message[Not Found]

Trying with
/usr/bin/lynx -source
to get
http://httpupdate3.cpanel.net/CPAN/authors/01mailrc.txt.gz

No success, the file that lynx has downloaded is an empty file.

It seems to be looping with the same set of errors and retrys so I stopped it. The complete output (2 &> 1) until I stopped it is the attached file.

So next I tried manually downloaded Modern::Perl from CPAN as Modern-Perl-1.20170117.zip; I unzipped and untarred it and ran the first step:

Code
perl Build.PL 2>&1 | tee -a install-Modern-Perl.txt 
Can't locate Module/Build.pm in @INC (you may need to install the Module::Build module)
(@INC contains: /usr/local/lib/perl5/site_perl/5.26/x86_64-cygwin-threads
/usr/local/share/perl5/site_perl/5.26
/usr/lib/perl5/vendor_perl/5.26/x86_64-cygwin-threads
/usr/share/perl5/vendor_perl/5.26 /usr/lib/perl5/5.26/x86_64-cygwin-threads
/usr/share/perl5/5.26) at Build.PL line 6.
BEGIN failed--compilation aborted at Build.PL line 6.

(I broke up that crazy long line so y'all don't have to scroll
Of course, I got similar results when I tried to install Module::Build

I am using the vanilla Perl that comes with CygWin, not Active or Strawberry.

Have I reached a dead end WRT Modern::Perl on CygWin or is there still a way to coax proper behavior out of it?

Thanks much!
--------------------
-- Rasputin Paskudniak (In perpetual pursuit of undomesticated, semi-aquatic avians)
Attachments: cpan-install-modern-perl-RP.txt (3.58 KB)


FishMonger
Veteran / Moderator

Nov 21, 2017, 4:37 PM

Post #2 of 4 (627 views)
Re: [rpaskudniak] Modern::Perl on CygWin [In reply to] Can't Post

It's been a long time since I've used Cygwin so I can't help much with it, but it appears to me the initial and main problem is your connection to your selected mirror.

Are you able to install other modules from that mirror? Have you tried other mirrors?

Is using Cygwin a requirement or can you use Strawberry perl?


rpaskudniak
User


Nov 21, 2017, 8:22 PM

Post #3 of 4 (623 views)
Re: [FishMonger] Modern::Perl on CygWin [In reply to] Can't Post

Fishmonger,

You are correct to have me try other modules. I just tried another, one of my own, and started to get similar results. So the problem is the mirror. So something is screwy with the configurations in my .cpan directory, which I did not set up intelligently; I merely ran the cpan command with no parameters and accepted all default choices. I did this all this on this PC 3 years ago but have done little Perl work here since then.

As to alternative installations of Perl, like Strawberry: This is something I will consider trying out. My reason for using CygWin is my desire to keep everything Unix-like. I can't always boot my other PC to Linux.

Thanks for the suggestion, though.

That said, what can I examine in the .cpan hierarchy; I'm utterly blind in this department. Frown

I have attached a copy of ~.cpan/CPAN/MyConfig.pm fwiw. If there's something in there I can change to make it work, I'd love to know about it. As well, a pointer to where these members are documented would be helpful.

Thanks!
--------------------
-- Rasputin Paskudniak (In perpetual pursuit of undomesticated, semi-aquatic avians)
Attachments: MyConfig.pm (2.02 KB)


Laurent_R
Veteran / Moderator

Nov 21, 2017, 11:15 PM

Post #4 of 4 (620 views)
Re: [rpaskudniak] Modern::Perl on CygWin [In reply to] Can't Post

Hi

I have also been preferring Cygwin to Strawberry (or Active State) when using a Windows PC, because the Linux-like environment is so much better and more powerful. This is less true nowadays, however, because it has become possible to use bash environment under Windows.

Having said that, I have had some Cygwin environment where I was unable to use any of the CPAN tools and to install any modules, and some where it was absolutely no problem. But I can't say why it was so or what the differences were. In one case at least, I just made a complete new install of Cygwin and it solved the problem, perhaps because I was more cautious on making the right configuration.

I know this doen't help very much, but maybe it does a little bit.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives