[32978] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4254 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 24 00:09:18 2014

Date: Wed, 23 Jul 2014 21:09:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 23 Jul 2014     Volume: 11 Number: 4254

Today's topics:
        Determining the last key when iterating through a hash <johnblack@nospam.com>
    Re: Determining the last key when iterating through a h <gamo@telecable.es>
    Re: Determining the last key when iterating through a h <jurgenex@hotmail.com>
    Re: Determining the last key when iterating through a h <rweikusat@mobileactivedefense.com>
    Re: Determining the last key when iterating through a h <johnblack@nospam.com>
    Re: Determining the last key when iterating through a h <rweikusat@mobileactivedefense.com>
    Re: Determining the last key when iterating through a h <johnblack@nospam.com>
    Re: Determining the last key when iterating through a h <rweikusat@mobileactivedefense.com>
    Re: Determining the last key when iterating through a h <johnblack@nospam.com>
    Re: Determining the last key when iterating through a h <mvdwege@mail.com>
        Does anyone here use GD:Simple - Can't get it installed <johnblack@nospam.com>
    Re: Does anyone here use GD:Simple - Can't get it insta <netnews@invalid.com>
    Re: Does anyone here use GD:Simple - Can't get it insta <johnblack@nospam.com>
    Re: Does anyone here use GD:Simple - Can't get it insta <rweikusat@mobileactivedefense.com>
    Re: Does anyone here use GD:Simple - Can't get it insta <netnews@invalid.com>
    Re: Does anyone here use GD:Simple - Can't get it insta <johnblack@nospam.com>
    Re: FAQ 7.23 How do I create a switch or case statement demmith@gmail.com
    Re: Not having good luck with cpan <johnblack@nospam.com>
    Re: Not having good luck with cpan <justin.1401@purestblue.com>
    Re: Not having good luck with cpan <johnblack@nospam.com>
        Switch module causes __DATA__ to not be read demmith@gmail.com
    Re: Switch module causes __DATA__ to not be read demmith@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 21 Jul 2014 16:34:36 -0500
From: John Black <johnblack@nospam.com>
Subject: Determining the last key when iterating through a hash
Message-Id: <MPG.2e3743686ef207de9897d7@news.eternal-september.org>

Running through the sorted keys of a hash as follows:  

  foreach $key (sort keys %signals) {
  ...
  }

I want to do something different inside the loop if I am working on the last key of the 
foreach.  How can I determine when the current $key is the last one?  Thanks.

John Black


------------------------------

Date: Mon, 21 Jul 2014 23:47:31 +0200
From: gamo <gamo@telecable.es>
Subject: Re: Determining the last key when iterating through a hash
Message-Id: <lqk1pn$491$1@speranza.aioe.org>

El 21/07/14 23:34, John Black escribió:
> Running through the sorted keys of a hash as follows:
>
>    foreach $key (sort keys %signals) {
>    ...
>    }
>
> I want to do something different inside the loop if I am working on the last key of the
> foreach.  How can I determine when the current $key is the last one?  Thanks.
>
> John Black
>

An easy response: do it by parts, like Jack the ripper.

my @temp = sort keys %signals;
my $yourkey = $temp[-1];

or do it in one pass

my $yourkey = (sort keys %signals)[-1];

or more elegantly

my $yourkey = pop (sort keys %signals);

(all untested)

After that, &doit($signals{$yourkey});

HTH

-- 
http://www.telecable.es/personales/gamo/


------------------------------

Date: Mon, 21 Jul 2014 15:04:27 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Determining the last key when iterating through a hash
Message-Id: <g73rs9d539rrkiv2drre6jn8jq7m7bpjfv@4ax.com>

John Black <johnblack@nospam.com> wrote:
>Running through the sorted keys of a hash as follows:  
>
>  foreach $key (sort keys %signals) {
>  ...
>  }
>
>I want to do something different inside the loop if I am working on the last key of the 
>foreach.  How can I determine when the current $key is the last one?  Thanks.

First you question has nothing to do with hashes or keys. It is simply
about how to process the last element of a list differently from all the
others, no matter where this list came from.

Having said that e.g. by processing the last element separately (i'm
sure this can be written more compact if so desired):

@regular = sort keys %signals;
$last = pop @regular;
foreach $item (@regular){
 ....}
process_last $last;

Or you could play around with the indices. 

jue


------------------------------

Date: Mon, 21 Jul 2014 23:10:48 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Determining the last key when iterating through a hash
Message-Id: <877g36xt07.fsf@sable.mobileactivedefense.com>

John Black <johnblack@nospam.com> writes:
> Running through the sorted keys of a hash as follows:  
>
>   foreach $key (sort keys %signals) {
>   ...
>   }
>
> I want to do something different inside the loop if I am working on the last key of the 
> foreach.  How can I determine when the current $key is the last one?  Thanks.

my %hash = qw(a 1 b 2 c 3);

#
# One possibility is to count the keys beforehand
# and use a running counter to determine when the
# last one is being processed.
#

my $n_keys = keys(%hash);
my $count;

for (sort(keys(%hash))) {
    print("last is $_\n") if ++$count == $n_keys;
}


#
# Another I like better is to store the keys into a
# temporary array (no worse than the for loop),
# process all but the last in a loop and the last
# one after that.
#

my @keys = sort(keys(%hash));
shift(@keys) while @keys > 1;
print("last is $keys[0]\n");


------------------------------

Date: Tue, 22 Jul 2014 13:54:49 -0500
From: John Black <johnblack@nospam.com>
Subject: Re: Determining the last key when iterating through a hash
Message-Id: <MPG.2e386f71c179df759897d8@news.eternal-september.org>

In article <g73rs9d539rrkiv2drre6jn8jq7m7bpjfv@4ax.com>, jurgenex@hotmail.com says...
> First you question has nothing to do with hashes or keys. It is simply
> about how to process the last element of a list differently from all the
> others, no matter where this list came from.

Thanks all.  I guess I didn't realize "sort keys %signals" returned a simple array.  It 
seemed more mysterious at the time.

John Black


------------------------------

Date: Tue, 22 Jul 2014 20:31:23 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Determining the last key when iterating through a hash
Message-Id: <87egxdmbqs.fsf@sable.mobileactivedefense.com>

John Black <johnblack@nospam.com> writes:
> In article <g73rs9d539rrkiv2drre6jn8jq7m7bpjfv@4ax.com>, jurgenex@hotmail.com says...
>> First you question has nothing to do with hashes or keys. It is simply
>> about how to process the last element of a list differently from all the
>> others, no matter where this list came from.
>
> Thanks all.  I guess I didn't realize "sort keys %signals" returned a
> simple array.

It doesn't really return an array. It returns a list which means 'some
set of values pushed onto the perl stack'.


------------------------------

Date: Tue, 22 Jul 2014 15:59:47 -0500
From: John Black <johnblack@nospam.com>
Subject: Re: Determining the last key when iterating through a hash
Message-Id: <MPG.2e388cc16b5b0a739897da@news.eternal-september.org>

In article <87egxdmbqs.fsf@sable.mobileactivedefense.com>, rweikusat@mobileactivedefense.com 
says...
> 
> John Black <johnblack@nospam.com> writes:
> > In article <g73rs9d539rrkiv2drre6jn8jq7m7bpjfv@4ax.com>, jurgenex@hotmail.com says...
> >> First you question has nothing to do with hashes or keys. It is simply
> >> about how to process the last element of a list differently from all the
> >> others, no matter where this list came from.
> >
> > Thanks all.  I guess I didn't realize "sort keys %signals" returned a
> > simple array.
> 
> It doesn't really return an array. It returns a list which means 'some
> set of values pushed onto the perl stack'.

Oh come on.  The words array and list are used pretty interchangably in Perl, are they not?

John Black


------------------------------

Date: Tue, 22 Jul 2014 22:18:34 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Determining the last key when iterating through a hash
Message-Id: <8761ipm6s5.fsf@sable.mobileactivedefense.com>

John Black <johnblack@nospam.com> writes:
> In article <87egxdmbqs.fsf@sable.mobileactivedefense.com>, rweikusat@mobileactivedefense.com 
> says...
>> 
>> John Black <johnblack@nospam.com> writes:
>> > In article <g73rs9d539rrkiv2drre6jn8jq7m7bpjfv@4ax.com>, jurgenex@hotmail.com says...
>> >> First you question has nothing to do with hashes or keys. It is simply
>> >> about how to process the last element of a list differently from all the
>> >> others, no matter where this list came from.
>> >
>> > Thanks all.  I guess I didn't realize "sort keys %signals" returned a
>> > simple array.
>> 
>> It doesn't really return an array. It returns a list which means 'some
>> set of values pushed onto the perl stack'.
>
> Oh come on.  The words array and list are used pretty interchangably
> in Perl, are they not?

I have no idea how you use these terms. Technially, an array is an
independent object with its own identity (that's why there can be
references to arrays) while a list just 'exists' (temporarily), usually
as argument list when calling a function or as list of returned values.

You're, of course, absolutely free not to care about that.


------------------------------

Date: Tue, 22 Jul 2014 17:27:10 -0500
From: John Black <johnblack@nospam.com>
Subject: Re: Determining the last key when iterating through a hash
Message-Id: <MPG.2e38a13b1f9913169897dc@news.eternal-september.org>

In article <8761ipm6s5.fsf@sable.mobileactivedefense.com>, rweikusat@mobileactivedefense.com 
says...
> 
> John Black <johnblack@nospam.com> writes:
> > In article <87egxdmbqs.fsf@sable.mobileactivedefense.com>, rweikusat@mobileactivedefense.com 
> > says...
> >> 
> >> John Black <johnblack@nospam.com> writes:
> >> > In article <g73rs9d539rrkiv2drre6jn8jq7m7bpjfv@4ax.com>, jurgenex@hotmail.com says...
> >> >> First you question has nothing to do with hashes or keys. It is simply
> >> >> about how to process the last element of a list differently from all the
> >> >> others, no matter where this list came from.
> >> >
> >> > Thanks all.  I guess I didn't realize "sort keys %signals" returned a
> >> > simple array.
> >> 
> >> It doesn't really return an array. It returns a list which means 'some
> >> set of values pushed onto the perl stack'.
> >
> > Oh come on.  The words array and list are used pretty interchangably
> > in Perl, are they not?
> 
> I have no idea how you use these terms. Technially, an array is an
> independent object with its own identity (that's why there can be
> references to arrays) while a list just 'exists' (temporarily), usually
> as argument list when calling a function or as list of returned values.
> 
> You're, of course, absolutely free not to care about that.

I do care.  Thanks.

John Black


------------------------------

Date: Wed, 23 Jul 2014 15:43:23 +0200
From: Mart van de Wege <mvdwege@mail.com>
Subject: Re: Determining the last key when iterating through a hash
Message-Id: <86d2cwfax0.fsf@gaheris.avalon.lan>

John Black <johnblack@nospam.com> writes:

> In article <87egxdmbqs.fsf@sable.mobileactivedefense.com>, rweikusat@mobileactivedefense.com 
> says...
>> 
>> John Black <johnblack@nospam.com> writes:
>> > In article <g73rs9d539rrkiv2drre6jn8jq7m7bpjfv@4ax.com>, jurgenex@hotmail.com says...
>> >> First you question has nothing to do with hashes or keys. It is simply
>> >> about how to process the last element of a list differently from all the
>> >> others, no matter where this list came from.
>> >
>> > Thanks all.  I guess I didn't realize "sort keys %signals" returned a
>> > simple array.
>> 
>> It doesn't really return an array. It returns a list which means 'some
>> set of values pushed onto the perl stack'.
>
> Oh come on.  The words array and list are used pretty interchangably in Perl, are they not?
>
Nope.

A list is just that, a list of values that can be processed. One of
things you can do with it is assign it to a variable, and then you have
an array.

Usually they can be used interchangeably, but for a good understanding of
what code does it is not a bad idea to get into the habit of making the
distinction.

-- 
"We will need a longer wall when the revolution comes."
    --- AJS, quoting an uncertain source.


------------------------------

Date: Tue, 22 Jul 2014 16:14:23 -0500
From: John Black <johnblack@nospam.com>
Subject: Does anyone here use GD:Simple - Can't get it installed
Message-Id: <MPG.2e38900eac8bc61d9897db@news.eternal-september.org>

I've been trying for several days to get this thing installed.  First I had to get the binary 
library on my system.  The latest version (2.1.0) is source only and so requires you to have 
Microsoft Visual C++ installed to make it but I found a not too downlevel version (2.0.33) 
that does a binary install.

Its config file is used by the CPAN install of GD but I had to convert the newlines to unix 
style for CPAN to be able to run it.

Then the CPAN installer could not compile its own thing because it called out gcc-4 and g++-4 
which are no longer named those things for the current version 4 compiler.  So I had to make 
links to gcc and g++ so the installer could find its compiler.

I think there was some other problem that made me upgrade CPAN and then I still needed force 
to get GD installed.  After all that, it looks like its actually installed.  I tried my first 
very simple program using GD:

#!/usr/bin/perl

use GD::Simple;

    # create a new image
    $img = GD::Simple->new(400,250);

    # draw a red rectangle with blue borders
    $img->bgcolor('red');
    $img->fgcolor('blue');
    $img->rectangle(10,10,50,50);

Segmentation fault (core dumped)
Exception: STATUS_ACCESS_VIOLATION at eip=80182727
eax=800283E4 ebx=800D2CF8 ecx=00000007 edx=00290000 esi=6C1B7625 edi=6C1B7625
ebp=80028360 esp=0028AA2C program=C:\cygwin\bin\perl.exe, pid 7712, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame     Function  Args
End of stack trace

ARG!  Does this thing work?!?  Does anyone have it working?

John Black


------------------------------

Date: Tue, 22 Jul 2014 15:58:30 -0700
From: HASM <netnews@invalid.com>
Subject: Re: Does anyone here use GD:Simple - Can't get it installed
Message-Id: <87iompxap5.fsf@127.0.0.1>

John Black <johnblack@nospam.com> writes:

> I've been trying for several days to get this thing installed.  First I had to get the binary 
> library on my system.  The latest version (2.1.0) is source only and so requires you to have 
> Microsoft Visual C++ installed to make it but I found a not too downlevel version (2.0.33) 
> that does a binary install.

I seem to have GD version 2.49 (GD::Simple doesn't seem to have a version
per se) on my linux box.   Either these things are numbered differently on
different OSes, or 2.1 is a bit old.

-- HASM


------------------------------

Date: Tue, 22 Jul 2014 22:25:42 -0500
From: John Black <johnblack@nospam.com>
Subject: Re: Does anyone here use GD:Simple - Can't get it installed
Message-Id: <MPG.2e38e72dfc8d73e79897dd@news.eternal-september.org>

In article <87iompxap5.fsf@127.0.0.1>, netnews@invalid.com says...
> 
> John Black <johnblack@nospam.com> writes:
> 
> > I've been trying for several days to get this thing installed.  First I had to get the binary 
> > library on my system.  The latest version (2.1.0) is source only and so requires you to have 
> > Microsoft Visual C++ installed to make it but I found a not too downlevel version (2.0.33) 
> > that does a binary install.
> 
> I seem to have GD version 2.49 (GD::Simple doesn't seem to have a version
> per se) on my linux box.   Either these things are numbered differently on
> different OSes, or 2.1 is a bit old.
> 
> -- HASM

Ok, I'm no expert since I haven't even gotten the damn thing working yet but here is what I 
understand.  You are talking about the Perl interface to the GD library which is on CPAN and 
the latest version of that is actually now up to 2.53.  There are interfaces to the GD 
library for other languages besides Perl.

But the GD library itself (which contains .dll and .exe files) must be installed on Windows 
(or Linux) before or with the Perl CPAN interface.  The library is main engine and the latest 
version of that is 2.1 (http://libgd.bitbucket.org/).  The thing on CPAN is called a 
"wrapper" that allows Perl programs to access the functions in the library.

John Black


------------------------------

Date: Wed, 23 Jul 2014 15:39:50 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Does anyone here use GD:Simple - Can't get it installed
Message-Id: <87wqb487gp.fsf@sable.mobileactivedefense.com>

John Black <johnblack@nospam.com> writes:
> I've been trying for several days to get this thing installed.  First I had to get the binary 
> library on my system.  The latest version (2.1.0) is source only and so requires you to have 
> Microsoft Visual C++ installed to make it but I found a not too downlevel version (2.0.33) 
> that does a binary install.
>
> Its config file is used by the CPAN install of GD but I had to convert the newlines to unix 
> style for CPAN to be able to run it.
>
> Then the CPAN installer could not compile its own thing because it called out gcc-4 and g++-4 
> which are no longer named those things for the current version 4 compiler.  So I had to make 
> links to gcc and g++ so the installer could find its compiler.
>
> I think there was some other problem that made me upgrade CPAN and then I still needed force 
> to get GD installed.

[...]

> #!/usr/bin/perl
>
> use GD::Simple;
>
>     # create a new image
>     $img = GD::Simple->new(400,250);
>
>     # draw a red rectangle with blue borders
>     $img->bgcolor('red');
>     $img->fgcolor('blue');
>     $img->rectangle(10,10,50,50);
>
> Segmentation fault (core dumped)

I'm using libgd 2.0.36 together with GD::Simple on 2.39 on Debian
(6). Considering the information above, my guess would be that the Perl
module and the library aren't really compatible at the ABI level. If you
have some gcc, why don't you use that to compile the library, too?
(this may be a stupid question but I don't Windows).


------------------------------

Date: Wed, 23 Jul 2014 08:29:46 -0700
From: HASM <netnews@invalid.com>
Subject: Re: Does anyone here use GD:Simple - Can't get it installed
Message-Id: <87egxcxfdh.fsf@127.0.0.1>

John Black <johnblack@nospam.com> writes:

> You are talking about the Perl interface to the GD library which is on
> CPAN and the latest version of that is actually now up to 2.53.

Well, the subject line has GD:Simple, which I (maybe too quickly) read as
GD::Simple, which is part of the Perl wrapper...

I do have gd 2.1 installed, not sure if I have tried that version, but last
time I tried gd (through the Perl wrapper) it worked.

-- HASM





------------------------------

Date: Wed, 23 Jul 2014 20:59:42 -0500
From: John Black <johnblack@nospam.com>
Subject: Re: Does anyone here use GD:Simple - Can't get it installed
Message-Id: <MPG.2e3a2487c63bc12c9897df@news.eternal-september.org>

In article <87wqb487gp.fsf@sable.mobileactivedefense.com>, rweikusat@mobileactivedefense.com 
says...
> 
> John Black <johnblack@nospam.com> writes:
> > I've been trying for several days to get this thing installed.  First I had to get the binary 
> > library on my system.  The latest version (2.1.0) is source only and so requires you to have 
> > Microsoft Visual C++ installed to make it but I found a not too downlevel version (2.0.33) 
> > that does a binary install.
> >
> > Its config file is used by the CPAN install of GD but I had to convert the newlines to unix 
> > style for CPAN to be able to run it.
> >
> > Then the CPAN installer could not compile its own thing because it called out gcc-4 and g++-4 
> > which are no longer named those things for the current version 4 compiler.  So I had to make 
> > links to gcc and g++ so the installer could find its compiler.
> >
> > I think there was some other problem that made me upgrade CPAN and then I still needed force 
> > to get GD installed.
> 
> [...]
> 
> > #!/usr/bin/perl
> >
> > use GD::Simple;
> >
> >     # create a new image
> >     $img = GD::Simple->new(400,250);
> >
> >     # draw a red rectangle with blue borders
> >     $img->bgcolor('red');
> >     $img->fgcolor('blue');
> >     $img->rectangle(10,10,50,50);
> >
> > Segmentation fault (core dumped)
> 
> I'm using libgd 2.0.36 together with GD::Simple on 2.39 on Debian
> (6). Considering the information above, my guess would be that the Perl
> module and the library aren't really compatible at the ABI level. If you
> have some gcc, why don't you use that to compile the library, too?
> (this may be a stupid question but I don't Windows).

I kind of tried that but the make file for libgd is for Microsoft Visual C++.  If it can be 
built with gcc/g++, I certainly don't know how but it didn't work.

John Black


------------------------------

Date: Tue, 22 Jul 2014 06:38:36 -0700 (PDT)
From: demmith@gmail.com
Subject: Re: FAQ 7.23 How do I create a switch or case statement?
Message-Id: <30e8f870-636c-4118-a918-e27acc3ae3ad@googlegroups.com>

The Switch module will cause scripts containing __DATA__ to not read __DATA__.


------------------------------

Date: Tue, 22 Jul 2014 13:59:28 -0500
From: John Black <johnblack@nospam.com>
Subject: Re: Not having good luck with cpan
Message-Id: <MPG.2e387086be8d16a39897d9@news.eternal-september.org>

In article <9tmq9b-9g1.ln1@moonlight.purestblue.com>, justin.1407@purestblue.com says...
> 
> On 2014-07-18, John Black <johnblack@nospam.com> wrote:
> > I've been trying to install GD:Simple for a while and ran into several issues which I tried 
> > hacking.  I kept getting farther but still could not complete.  I won't go into those yet 
> > because it was suggested to me to first try upgrading my cpan to the latest version with:
> >
> >cpan> install Bundle::CPAN
> 
> I don't know what Bundle::CPAN is, but when CPAN tells me it can be
> upgraded it says to do it with:
> 
>   install CPAN
>   reload CPAN
> 
> Is Bundle::CPAN a CYGWIN thing? ... no, it's a "Bundle to optimize
> the behaviour of CPAN.pm". Hmmm... Maybe avoid Bundle::CPAN in
> favour of CPAN?

Thanks for the suggestion.  But got the same problem with "install CPAN".  It was the tests 
that were hanging up so if I just run "make CPAN", it seems to work.  I still can't get GD 
installed but I think that is more about not having the proper prerequisites installed.

John Black


------------------------------

Date: Wed, 23 Jul 2014 10:37:19 +0100
From: Justin C <justin.1401@purestblue.com>
Subject: Re: Not having good luck with cpan
Message-Id: <fbc4ab-oca.ln1@zem.masonsmusic.co.uk>

On 2014-07-22, John Black <johnblack@nospam.com> wrote:
> In article <9tmq9b-9g1.ln1@moonlight.purestblue.com>, justin.1407@purestblue.com says...
>> 
>> On 2014-07-18, John Black <johnblack@nospam.com> wrote:
>> > I've been trying to install GD:Simple for a while and ran into several issues which I tried 
>> > hacking.  I kept getting farther but still could not complete.  I won't go into those yet 
>> > because it was suggested to me to first try upgrading my cpan to the latest version with:
>> >
>> >cpan> install Bundle::CPAN
>> 
>> I don't know what Bundle::CPAN is, but when CPAN tells me it can be
>> upgraded it says to do it with:
>> 
>>   install CPAN
>>   reload CPAN
>> 
>> Is Bundle::CPAN a CYGWIN thing? ... no, it's a "Bundle to optimize
>> the behaviour of CPAN.pm". Hmmm... Maybe avoid Bundle::CPAN in
>> favour of CPAN?
>
> Thanks for the suggestion.  But got the same problem with "install CPAN".  It was the tests 
> that were hanging up so if I just run "make CPAN", it seems to work.  I still can't get GD 
> installed but I think that is more about not having the proper prerequisites installed.

make CPAN may work, but that doesn't install anything. Check the cpan
docs, you can 'force' to install even when tests fail - of course, 
those test are for a reason, there is every possibility your software 
won't work at all because of the failure - however, it is also possible
that the failure was caused by something non-critical for your purpose,
only you can be sure of that. Caveat emptor, IANAL, if you break it you
can keep both parts, etc.


   Justin.

-- 
Justin C, by the sea.


------------------------------

Date: Wed, 23 Jul 2014 19:24:08 -0500
From: John Black <johnblack@nospam.com>
Subject: Re: Not having good luck with cpan
Message-Id: <MPG.2e3a0e1ec7150af49897de@news.eternal-september.org>

In article <fbc4ab-oca.ln1@zem.masonsmusic.co.uk>, justin.1401@purestblue.com says...
> 
> On 2014-07-22, John Black <johnblack@nospam.com> wrote:
> > In article <9tmq9b-9g1.ln1@moonlight.purestblue.com>, justin.1407@purestblue.com says...
> >> 
> >> On 2014-07-18, John Black <johnblack@nospam.com> wrote:
> >> > I've been trying to install GD:Simple for a while and ran into several issues which I tried 
> >> > hacking.  I kept getting farther but still could not complete.  I won't go into those yet 
> >> > because it was suggested to me to first try upgrading my cpan to the latest version with:
> >> >
> >> >cpan> install Bundle::CPAN
> >> 
> >> I don't know what Bundle::CPAN is, but when CPAN tells me it can be
> >> upgraded it says to do it with:
> >> 
> >>   install CPAN
> >>   reload CPAN
> >> 
> >> Is Bundle::CPAN a CYGWIN thing? ... no, it's a "Bundle to optimize
> >> the behaviour of CPAN.pm". Hmmm... Maybe avoid Bundle::CPAN in
> >> favour of CPAN?
> >
> > Thanks for the suggestion.  But got the same problem with "install CPAN".  It was the tests 
> > that were hanging up so if I just run "make CPAN", it seems to work.  I still can't get GD 
> > installed but I think that is more about not having the proper prerequisites installed.
> 
> make CPAN may work, but that doesn't install anything. Check the cpan
> docs, you can 'force' to install even when tests fail - of course, 
> those test are for a reason, there is every possibility your software 
> won't work at all because of the failure - however, it is also possible
> that the failure was caused by something non-critical for your purpose,
> only you can be sure of that. Caveat emptor, IANAL, if you break it you
> can keep both parts, etc.

Thanks, yeah I guess that didn't install.  I was able to install with notest install CPAN.  I 
get that a test might have been failing for a reason but it seems to be working.  Thanks.

John Black


------------------------------

Date: Tue, 22 Jul 2014 06:43:18 -0700 (PDT)
From: demmith@gmail.com
Subject: Switch module causes __DATA__ to not be read
Message-Id: <c1183daf-0a01-4ef0-82d0-6be4d6e2f8aa@googlegroups.com>

If your script contains the __DATA__ token AND you are using the Switch module, your __DATA__ token will not be read.


------------------------------

Date: Tue, 22 Jul 2014 06:46:13 -0700 (PDT)
From: demmith@gmail.com
Subject: Re: Switch module causes __DATA__ to not be read
Message-Id: <3afade7d-a731-4a0e-82f0-343378752f66@googlegroups.com>

I forgot to mention...
This is Perl 5.12.3


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 4254
***************************************


home help back first fref pref prev next nref lref last post