[23803] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6006 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 29 19:26:06 2004

Date: Thu, 29 Jan 2004 16:25:36 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 29 Jan 2004     Volume: 10 Number: 6006

Today's topics:
        Floating point (Sajan)
    Re: Floating point <carsten@welcomes-you.com>
    Re: Floating point <tassilo.parseval@rwth-aachen.de>
    Re: Floating point <jurgenex@hotmail.com>
    Re: Floating point ctcgag@hotmail.com
        foreach loop problem <ihatespam@hotmail.com>
    Re: foreach loop problem (Walter Roberson)
    Re: foreach loop problem <xaonon@hotpop.com>
    Re: foreach loop problem <ihatespam@hotmail.com>
    Re: foreach loop problem <perl@my-header.org>
    Re: foreach loop problem (Anno Siegel)
    Re: Free Perl scripts <1usa@llenroc.ude>
    Re: Free Perl scripts <gkros@net.com>
    Re: Free Perl scripts <kirk@strauser.com>
    Re: Free Perl scripts <matthew.garrish@sympatico.ca>
        Freelance PHP/MySQL developer is looking for job (Alex C.)
    Re: Freelance PHP/MySQL developer is looking for job (Vorxion)
    Re: Freelance PHP/MySQL developer is looking for job <davidvb@notmydomain.com>
        Fresh install failed (Xavi Garriga)
    Re: GD::Graph on Win32 <kalinaubears@iinet.net.au>
    Re: GD::Graph on Win32 (sidsharma)
        GD::Graph: can't install cpan module (Cheez)
    Re: GD::Graph: can't install cpan module (Sam Holden)
    Re: GD::Graph: can't install cpan module (Cheez)
    Re: GD::Graph: can't install cpan module <dwall@fastmail.fm>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 26 Jan 2004 02:14:52 -0800
From: s_sajan_s@yahoo.com (Sajan)
Subject: Floating point
Message-Id: <d244d444.0401260214.1a673b7d@posting.google.com>

Hi
I am new to perl.
I have a problem with floating point arithmetic.

I am using a a variable $time_now which i want to increment by 0.001 
everytime in a while loop until the $tot_time is equal to $time_now.

I am using

$accuracy = 0.001;
$time_now = 0.0;
$tot_time = 10.0;

while ($time_now <= $tot_time)
{
   #couple of calculations based on $time_now;
   $time_now = $time_now + $accuracy;
}

now the problem i am facing is 

$time_now becomes 0.0019999999993, 0.0029999999993 etc
but for my calculations i expect only 0.001, 0.002 etc upto 10.0.
In short i dont expect such an accurate precision

Please let me know how to overcome this.

Thanking you for your help.

Sajan.


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

Date: Mon, 26 Jan 2004 11:28:31 +0100
From: Carsten Aulbert <carsten@welcomes-you.com>
Subject: Re: Floating point
Message-Id: <bv2q55$najch$1@ID-213226.news.uni-berlin.de>



Sajan wrote:

> Please let me know how to overcome this.

Why not simply use an integer counter a la
$time_count = 0;

let it rund till $time_count < 10000 (e.g.)

and then just add this up with $time_count++ and finally multiply by 
$accuracy to get the wanted value.

HTH
CA


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

Date: 26 Jan 2004 10:34:01 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: Floating point
Message-Id: <bv2qep$isg$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Sajan:

> I am new to perl.
> I have a problem with floating point arithmetic.
> 
> I am using a a variable $time_now which i want to increment by 0.001 
> everytime in a while loop until the $tot_time is equal to $time_now.
> 
> I am using
> 
> $accuracy = 0.001;
> $time_now = 0.0;
> $tot_time = 10.0;
> 
> while ($time_now <= $tot_time)
> {
>    #couple of calculations based on $time_now;
>    $time_now = $time_now + $accuracy;
> }
> 
> now the problem i am facing is 
> 
> $time_now becomes 0.0019999999993, 0.0029999999993 etc
> but for my calculations i expect only 0.001, 0.002 etc upto 10.0.
> In short i dont expect such an accurate precision

Non-precision rather. Floating point numbers are usually just an
approximation. That means there might not be (and usually there is no)
exact representation of 0.001.

> Please let me know how to overcome this.

You can ask perl to round the number to the desired amount of decimals:

    while ($time_now <= $tot_time) {
        $time_now += $accuracy;
        printf "%.3f\n", $time_now;
    }

With 'sprintf' you can assign the rounded number:

    my $rounded = sprintf "%.3f", $time_now;

The implication of all that is that you should never do

    if ($num == 0.001)

because most of the time this condition wont be true. Instead, use
a delta to allow a certain tolerance:

    my $delta = 1E-8;
    if ( abs($num - 0.001) <= $delta )

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Mon, 26 Jan 2004 16:17:41 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Floating point
Message-Id: <F4bRb.35$p55.14@nwrddc02.gnilink.net>

Sajan wrote:
> Hi
> I am new to perl.

It appears you are new to programming, too, because your problem is in no
way specific to Perl.

> I have a problem with floating point arithmetic.
> I am using a a variable $time_now which i want to increment by 0.001
> everytime in a while loop until the $tot_time is equal to $time_now.

You must have missed the first law of computer numerics
    Thou shalt not use floating point for precision calculations.
In particular comparing for equality is just stupid.

> $time_now becomes 0.0019999999993, 0.0029999999993 etc
> but for my calculations i expect only 0.001, 0.002 etc upto 10.0.
> In short i dont expect such an accurate precision
>
> Please let me know how to overcome this.

You use an epsilon interval. Further details see any book about Introduction
to Programming (if it's worth its money), about computer numerics, or just
"perldoc -q 9999".

jue




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

Date: 26 Jan 2004 18:30:34 GMT
From: ctcgag@hotmail.com
Subject: Re: Floating point
Message-Id: <20040126133034.450$GY@newsreader.com>

s_sajan_s@yahoo.com (Sajan) wrote:
> Hi
> I am new to perl.
> I have a problem with floating point arithmetic.
>
> I am using a a variable $time_now which i want to increment by 0.001
> everytime in a while loop until the $tot_time is equal to $time_now.
>
> I am using
>
> $accuracy = 0.001;
> $time_now = 0.0;
> $tot_time = 10.0;
>
> while ($time_now <= $tot_time)
> {
>    #couple of calculations based on $time_now;
>    $time_now = $time_now + $accuracy;
> }
>
> now the problem i am facing is
>
> $time_now becomes 0.0019999999993, 0.0029999999993 etc
> but for my calculations i expect only 0.001, 0.002 etc upto 10.0.
> In short i dont expect such an accurate precision
>
> Please let me know how to overcome this.

Change you units from seconds to milliseconds  (or from milliseconds
to microseconds, or whatever).  If you need to multiply/divide by 1000
after/before input/ouput, do that.  But in the loop, just deal with
integers.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service              New Rate! $9.95/Month 50GB


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

Date: Wed, 28 Jan 2004 23:12:06 -0800
From: BigDaDDY <ihatespam@hotmail.com>
Subject: foreach loop problem
Message-Id: <101hci01j774l75@corp.supernews.com>

I am getting the following error with perl 5.6.1. 

Modification of a read-only value attempted

However, I am not getting this error with earlier versions of Perl.  Is 
there a way to do the code below without raising an error?




foreach my $param (qw(E_p1 E_p2 E_p3 E_p4)){

   $param =~ s/E_//g;

   if ($default{"E_$param"}){

      $E{$param} = $default{"E_$param"});
   }
}



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

Date: 29 Jan 2004 07:43:10 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: foreach loop problem
Message-Id: <bvadie$ope$1@canopus.cc.umanitoba.ca>

In article <101hci01j774l75@corp.supernews.com>,
BigDaDDY  <ihatespam@hotmail.com> wrote:
:I am getting the following error with perl 5.6.1. 

:Modification of a read-only value attempted

:However, I am not getting this error with earlier versions of Perl.  Is 
:there a way to do the code below without raising an error?

my $bareparam;

foreach my $param (qw(E_p1 E_p2 E_p3 E_p4)){
   if (exists $default{$param}){
      ($bareparam = $param) =~ s/E_//;
      $E{$bareparam} = $default{$param});
   }
}
-- 
Would you buy a used bit from this man??


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

Date: 29 Jan 2004 07:51:38 GMT
From: Xaonon <xaonon@hotpop.com>
Subject: Re: foreach loop problem
Message-Id: <slrnc1herp.kqq.xaonon@xaonon.local>

Ned i bach <101hci01j774l75@corp.supernews.com>, BigDaDDY
<ihatespam@hotmail.com> teithant i thiw hin:

> I am getting the following error with perl 5.6.1. 
> 
> Modification of a read-only value attempted
> 
> However, I am not getting this error with earlier versions of Perl.  Is 
> there a way to do the code below without raising an error?
> 
> foreach my $param (qw(E_p1 E_p2 E_p3 E_p4)){
> 
>    $param =~ s/E_//g;
> 
>    if ($default{"E_$param"}){
> 
>       $E{$param} = $default{"E_$param"});
>    }
> }

Ignoring for the moment the incorrectly placed parenthesis, the real problem
is the way you're specifying the item to loop over.  From perlsyn:

# If any element of LIST is an lvalue, you can modify it by
# modifying VAR inside the loop.  Conversely, if any element
# of LIST is NOT an lvalue, any attempt to modify that ele­
# ment will fail.  In other words, the "foreach" loop index
# variable is an implicit alias for each item in the list
# that you're looping over.

That is, $param points directly to the literal strings "E_p1", etc., and not
to variables holding those values.  Try something like this instead:

    my @strings = qw( E_p1 E_p2 E_p3 E_p4 );
    foreach my $param ( @strings )
    {
        ...
    }

-- 
Xaonon, EAC Chief of Mad Scientists and informal BAAWA, aa #1821, Kibo #: 1
http://xaonon.dyndns.org/  Guaranteed content-free since 1999.  No refunds.
"Uh oh, indeed.  After vigintillions of years plush Cthulhu was loose once
more, and ravening for delight.  How He slavered and gibbered!"


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

Date: Thu, 29 Jan 2004 00:31:30 -0800
From: BigDaDDY <ihatespam@hotmail.com>
Subject: Re: foreach loop problem
Message-Id: <101hh739ho8di6b@corp.supernews.com>

Xaonon wrote:

> Ned i bach <101hci01j774l75@corp.supernews.com>, BigDaDDY
> <ihatespam@hotmail.com> teithant i thiw hin:
> 
>> I am getting the following error with perl 5.6.1.
>> 
>> Modification of a read-only value attempted
>> 
>> However, I am not getting this error with earlier versions of Perl.  Is
>> there a way to do the code below without raising an error?
>> 
>> foreach my $param (qw(E_p1 E_p2 E_p3 E_p4)){
>> 
>>    $param =~ s/E_//g;
>> 
>>    if ($default{"E_$param"}){
>> 
>>       $E{$param} = $default{"E_$param"});
>>    }
>> }
> 
> Ignoring for the moment the incorrectly placed parenthesis, the real
> problem
> is the way you're specifying the item to loop over.  From perlsyn:
> 
> # If any element of LIST is an lvalue, you can modify it by
> # modifying VAR inside the loop.  Conversely, if any element
> # of LIST is NOT an lvalue, any attempt to modify that ele­
> # ment will fail.  In other words, the "foreach" loop index
> # variable is an implicit alias for each item in the list
> # that you're looping over.
> 
> That is, $param points directly to the literal strings "E_p1", etc., and
> not
> to variables holding those values.  Try something like this instead:
> 
>     my @strings = qw( E_p1 E_p2 E_p3 E_p4 );
>     foreach my $param ( @strings )
>     {
>         ...
>     }
> 
Thank you SO much!!!

You guys are AWESOME!


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

Date: Thu, 29 Jan 2004 19:48:35 +0100
From: Matija Papec <perl@my-header.org>
Subject: Re: foreach loop problem
Message-Id: <utki10d2nlonuaotseddu6bfcond3lnof2@4ax.com>

X-Ftn-To: BigDaDDY 

BigDaDDY <ihatespam@hotmail.com> wrote:
>I am getting the following error with perl 5.6.1. 
>
>Modification of a read-only value attempted
>
>However, I am not getting this error with earlier versions of Perl.  Is 
>there a way to do the code below without raising an error?

You could use new $param so it wouldn't alias to readonly list,

foreach my $param (qw(E_p1 E_p2 E_p3 E_p4)){
  my $param = $param;
  ...
}

or force your list to first run through map function,
foreach my $param (map $_, qw(E_p1 E_p2 E_p3 E_p4)){
  ..
}


-- 
Matija


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

Date: 29 Jan 2004 18:59:47 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: foreach loop problem
Message-Id: <bvbl73$ibn$1@mamenchi.zrz.TU-Berlin.DE>

Xaonon  <xaonon@hotpop.com> wrote in comp.lang.perl.misc:
> Ned i bach <101hci01j774l75@corp.supernews.com>, BigDaDDY
> <ihatespam@hotmail.com> teithant i thiw hin:
> 
> > I am getting the following error with perl 5.6.1. 
> > 
> > Modification of a read-only value attempted
> > 
> > However, I am not getting this error with earlier versions of Perl.  Is 
> > there a way to do the code below without raising an error?
> > 
> > foreach my $param (qw(E_p1 E_p2 E_p3 E_p4)){

[...]

> That is, $param points directly to the literal strings "E_p1", etc., and not
> to variables holding those values.  Try something like this instead:
> 
>     my @strings = qw( E_p1 E_p2 E_p3 E_p4 );
>     foreach my $param ( @strings )
>     {
>         ...
>     }

If you don't mind the resulting snakes-nest of assorted parens, the variable
can remain anonymous:

    foreach ( @{[ qw( E_p1 E_p2 E_p3 E_p4 )]} ) {

Anno


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

Date: 19 Jan 2004 21:44:25 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude>
Subject: Re: Free Perl scripts
Message-Id: <Xns9475AA4B02C63asu1cornelledu@132.236.56.8>

"Greg Krosmey" <gkros@net.com> wrote in news:BTXOb.13450$RG.8900
@newssvr27.news.prodigy.com:

> Robin wrote:
> ~ try matts scripts archive, forget the url
> ~
> 
> Please dont use Matt Garnish's awful awful buggy scripts unless you
> cherish using code with broken security (read non existant.)

You do realize that the infamous Matt is Matt Wright and (I am assuming) is 
not the same person as Matt Garrish who regularly contributes to this 
forum.

-- 
A. Sinan Unur
1usa@llenroc.ude (reverse each component for email address)


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

Date: Mon, 19 Jan 2004 22:12:56 GMT
From: "Greg Krosmey" <gkros@net.com>
Subject: Re: Free Perl scripts
Message-Id: <IDYOb.13467$091.3535@newssvr27.news.prodigy.com>

A. Sinan Unur wrote:
> "Greg Krosmey" <gkros@net.com> wrote in news:BTXOb.13450$RG.8900
> @newssvr27.news.prodigy.com:
>
>> Robin wrote:
>> ~ try matts scripts archive, forget the url
>> ~
>>
>> Please dont use Matt Garnish's awful awful buggy scripts unless you
>> cherish using code with broken security (read non existant.)
>
> You do realize that the infamous Matt is Matt Wright and (I am
> assuming) is not the same person as Matt Garrish who regularly
> contributes to this forum.

My mistake I must of saw the name in the thread below and for some
reason my mind made me write that instead of Wright which is correct and
is what I meant to write. Sorry.




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

Date: Mon, 19 Jan 2004 22:50:05 GMT
From: Kirk Strauser <kirk@strauser.com>
Subject: Re: Free Perl scripts
Message-Id: <87llo3o8ow.fsf@strauser.com>

=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 2004-01-19T21:25:55Z, "Greg Krosmey" <gkros@net.com> writes:

> Why does your PGP sig code report as invalid?

It's an Outlook Express thing.

> For that matter why even use PGP for usenet?

For the same reason I use it in regular mail, honestly.

> In the end the PGP output ends up as plain text in the message body which
> cna easily be faked, so why even bother using it then?

There is no (published) means by which an RSA signature can be faked.

Karsten Self wrote a pretty good answer to "why":

    http://kmself.home.netcom.com/Rants/gpg-signed-mail.html

I think he was kind of agitate when he wrote it, but the basic message rings
true.

> It has other uses outside of usenet of course, don't get me wrong about
> that, but seems completely pointless for usenet.

I respectfully disagree.  I sign all of my outbound messages.  If you find
an unsigned message claiming to be from me, assume that it is forged.
=2D --=20
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFADF8C5sRg+Y0CpvERAmuyAJ9FCqUC9zIlMjvXoMMh9Pe7MYoUvQCePCBr
3kjdTk3dakHsEQmQE+X9X4g=3D
=3D4bJK
=2D----END PGP SIGNATURE-----


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

Date: Mon, 19 Jan 2004 18:14:33 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Free Perl scripts
Message-Id: <nxZOb.4840$rW5.198026@news20.bellglobal.com>


"Greg Krosmey" <gkros@net.com> wrote in message
news:BTXOb.13450$RG.8900@newssvr27.news.prodigy.com...
> Robin wrote:
> ~ try matts scripts archive, forget the url
> ~
>
> Please dont use Matt Garnish's awful awful buggy scripts unless you
> cherish using code with broken security (read non existant.)
>

That was harsh, and you didn't even get my last name right... : (

(I saw your followup, though, and apology accepted!)

Matt




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

Date: 29 Jan 2004 03:11:02 -0800
From: alex_c@list.ru (Alex C.)
Subject: Freelance PHP/MySQL developer is looking for job
Message-Id: <97529d5.0401290311.340e4bff@posting.google.com>

I'm experienced PHP/Coldfusion developer from Russia with more than 5
years of experience in the field.

Also i have a good web designer here. So we can create the whole site
from the very beginning.

If you want to make a hi-quality website fast and for a reasonable
price - than this offer is for you.

I usually charge USD 5-7 per hour, but would rather like flat-rate
per-project prices. 

Here are some links to the latest projects:
http://www.flitejobs.com/
http://www.nestle-waters.com/
http://www.coolsailing.com/
http://www.allez.com/moteur/
http://www.allez.com/allezshopping/

We also can make online flash games like 
http://ns3532.ovh.net/fortek/candy/
http://ns3532.ovh.net/fortek/boulangere/
http://ns3532.ovh.net/tetra/

Complete portfolio will be sent by your request.

Please contact via email at alex_c@list.ru if you are interested in
working with me.

Thanks


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

Date: 29 Jan 2004 06:16:55 -0500
From: vorxion@knockingshopofthemind.com (Vorxion)
Subject: Re: Freelance PHP/MySQL developer is looking for job
Message-Id: <4018eba7$1_1@news.iglou.com>

In article <97529d5.0401290311.340e4bff@posting.google.com>, Alex C. wrote:
>I'm experienced PHP/Coldfusion developer from Russia with more than 5
>years of experience in the field.

Strangely enough, you've cross-posted to the ***Perl*** freelance group as
well.  Given that massive attention to detail, you're really not a likely
candidate for hire, are you?  :)

-- 
Vorxion - Member of The Vortexa Elite


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

Date: Fri, 30 Jan 2004 09:40:02 +1100
From: David VB <davidvb@notmydomain.com>
Subject: Re: Freelance PHP/MySQL developer is looking for job
Message-Id: <rVfSb.6$%W.528@nnrp1.ozemail.com.au>

Alex C. wrote:

> http://www.flitejobs.com/

Looks quite nice but you have work to do in the HTML, fixing 
accessibility issues, using css, etc. I'm guessing you mainly use 
DreamWeaver - don't - it isn't a tool any professional should use.



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

Date: 29 Jan 2004 01:42:03 -0800
From: highsummer2001@yahoo.com (Xavi Garriga)
Subject: Fresh install failed
Message-Id: <b15386a3.0401290142.5713088e@posting.google.com>

Hi,

 I've donwloaded fresh install of perl 5.6 for Solaris from
Activestate,
 and running install script it fails with next message :

 Can't locate strict.pm in @INC (@INC contains:
/tmp/.TheInstallScriptWasNotRunTheInstallScriptWasNotRunTheInstallScriptWasNotRun-perl/lib/5.6.1/sun4-solaris-thread-multi
/tmp/.TheInstallScriptWasNotRunTheInstallScriptWasNotRunTheInstallScriptWasNotRun-perl/lib/5.6.1
/tmp/.TheInstallScriptWasNotRunTheInstallScriptWasNotRunTheInstallScriptWasNotRun-perl/lib/site_perl/5.6.1/sun4-solaris-thread-multi
/tmp/.TheInstallScriptWasNotRunTheInstallScriptWasNotRunTheInstallScriptWasNotRun-perl/lib/site_perl/5.6.1
/tmp/.TheInstallScriptWasNotRunTheInstallScriptWasNotRunTheInstallScriptWasNotRun-perl/lib/site_perl
 .) at /tmp/.TheInstallScriptWasNotRunTheInstallScriptWasNotRunTheInstallScriptWasNotRun-perl/bin/reloc_perl
line 6.
BEGIN failed--compilation aborted at
/tmp/.TheInstallScriptWasNotRunTheInstallScriptWasNotRunTheInstallScriptWasNotRun-perl/bin/reloc_perl
line 6.

    Install failed, unable to relocate perl!

 Thans for your time

Xavier Garriga


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

Date: Thu, 22 Jan 2004 08:44:46 +1100
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: GD::Graph on Win32
Message-Id: <400ef3bb$0$1757$5a62ac22@freenews.iinet.net.au>

Martien Verbruggen wrote:

> For ActiveState, just use ppm to install
> both GD and GD::Graph (as well as GD::Text). If you have perl 5.8.0, I
> have heard that ActiveState still hasn't made GD available for that. A
> post in this group, or comp.lang.perl.modules, less than two weeks ago,
> posted another ppm archive where GD was available. groups.google.com
> should help you find that post. I didn't keep trak of that information.
> 
> Martien

More'n'likely that would have been the 5.8 ppm repository maintained by 
Randy Kobes:

http://theoryx5.uwinnipeg.ca/ppms/

Cheers,
Rob

-- 
To reply by email u have to take out the u in kalinaubears.



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

Date: 24 Jan 2004 12:01:24 -0800
From: sidsharma@yahoo.com (sidsharma)
Subject: Re: GD::Graph on Win32
Message-Id: <9c3d003b.0401241201.7ecd9426@posting.google.com>

Thanks everytone for your help.

regards
Sid


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

Date: 27 Jan 2004 19:08:11 -0800
From: cheez2112@yahoo.com (Cheez)
Subject: GD::Graph: can't install cpan module
Message-Id: <1e85f7c8.0401271908.54278f4e@posting.google.com>

Hi there, I can't seem to install the GD::Graph module using the AS
PPM.  I would have expected this module to be available in the default
repositories however no search turns up GD.  There is SVG-GD and other
variants of GD but no GD, the one, of course, I think I need!

When I try to 'use GD;' in a script I get this error (of course):

---------
Can't locate GD/Graph.pm in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/lib .)
at graph_test.pl line 5.
BEGIN failed--compilation aborted at graph_test.pl line 5.
------------

I did find GD source code (GD.pm) on CPAN but I'm not sure exactly
what to do with it.

Any help in figuring out what's going would be greatly appreciated.

Thanks,
Dan


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

Date: 28 Jan 2004 04:39:02 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: GD::Graph: can't install cpan module
Message-Id: <slrnc1ef76.m2l.sholden@flexal.cs.usyd.edu.au>

On 27 Jan 2004 19:08:11 -0800, Cheez <cheez2112@yahoo.com> wrote:
> Hi there, I can't seem to install the GD::Graph module using the AS
> PPM.  I would have expected this module to be available in the default
> repositories however no search turns up GD.  There is SVG-GD and other
> variants of GD but no GD, the one, of course, I think I need!
> 
> When I try to 'use GD;' in a script I get this error (of course):
> 
> ---------
> Can't locate GD/Graph.pm in @INC (@INC contains: C:/Perl/lib
> C:/Perl/site/lib .)
> at graph_test.pl line 5.
> BEGIN failed--compilation aborted at graph_test.pl line 5.
> ------------
> 
> I did find GD source code (GD.pm) on CPAN but I'm not sure exactly
> what to do with it.

It's far more than just GD.pm, you need the entire tarball plus an
install of the gd C libraries plus a compiler (probably the same
one as was used to compile the perl you are using).


> Any help in figuring out what's going would be greatly appreciated.

Activestate haven't got GD working with 5.8:

http://ppm.activestate.com/BuildStatus/5.8.html

Hence it isn't available. (by the way you are allowed to have a look
at ehri web site before asking here...)

A simple google reveals http://theoryx5.uwinnipeg.ca/ppms/ as a possible
source of GD for ActivePerl 8, and http://theoryx5.uwinnipeg.ca/ppmpackages/
for ActivePerl 6.


-- 
Sam Holden


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

Date: 29 Jan 2004 11:05:08 -0800
From: cheez2112@yahoo.com (Cheez)
Subject: Re: GD::Graph: can't install cpan module
Message-Id: <1e85f7c8.0401291105.10fa5812@posting.google.com>

sholden@flexal.cs.usyd.edu.au (Sam Holden) wrote in message news:<slrnc1ef76.m2l.sholden@flexal.cs.usyd.edu.au>...
> On 27 Jan 2004 19:08:11 -0800, Cheez <cheez2112@yahoo.com> wrote:[snip]

> Hence it isn't available. (by the way you are allowed to have a look
> at ehri web site before asking here...)

Hi Sam, thanks for the information. Just picked up Perl as a hobby and
as such, still a newbie to the whole realm.  One comment, you really
don't have to reply to me in a tone that suggests I'm dumb or an
idiot.  I did indeed look at the website but couldn't/didn't find what
I was looking for.

I do notice, in general, that the regulars on this NG really don't
have too much patience for newbies.  Surely Perl is not only for the
elite. I could announce in each and every post that I am a newbie, but
I have observed that this usually puts a bullseye on the back of one's
post.  I don't remark on this observation because I need sympathy - I
am thick skinned - but this group is hard core.  What brings about
such a superiority complex?  Are all programmers this way? I would
think that those in the "know" would want more people to enjoy the
nuances of Perl.

Anyhow, back to semi-lurker mode.  

Thanks again for the information.
-Cheez 

> A simple google reveals http://theoryx5.uwinnipeg.ca/ppms/ as a possible
> source of GD for ActivePerl 8, and http://theoryx5.uwinnipeg.ca/ppmpackages/
> for ActivePerl 6.


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

Date: Thu, 29 Jan 2004 22:45:12 -0000
From: "David K. Wall" <dwall@fastmail.fm>
Subject: Re: GD::Graph: can't install cpan module
Message-Id: <Xns947FB49919C31dkwwashere@216.168.3.30>

Cheez <cheez2112@yahoo.com> wrote:

> I do notice, in general, that the regulars on this NG really don't
> have too much patience for newbies.  Surely Perl is not only for the
> elite. I could announce in each and every post that I am a newbie, but
> I have observed that this usually puts a bullseye on the back of one's
> post.  I don't remark on this observation because I need sympathy - I
> am thick skinned - but this group is hard core.  What brings about
> such a superiority complex?  Are all programmers this way? I would
> think that those in the "know" would want more people to enjoy the
> nuances of Perl.

It's not superiority, I think, just impatience with perceived time-wasters.  
People who ask FAQs when they've already been directed to the FAQ.  People 
who say "Perl sux, I r00l, you're all stupid, and BTW, can u help me with 
this?" People who won't use modules when it would take less time for them 
to read the module docs and write the code than it would for them 
repeatedly post about why they don't use modules. People who insist on 
doing something their way when others know from bitter experience that 
*that* way will eventually create problems. And on and on. Some valued 
contributors to this group have left because they finally became tired of 
dealing with it.  

From http://www.catb.org/~esr/faqs/smart-questions.html, which is a pretty 
good take on the subject:

"Much of what looks like rudeness in hacker circles is not intended to give 
offence. Rather, it's the product of the direct, cut-through-the-bullshit 
communications style that is natural to people who are more concerned about 
solving problems than making others feel warm and fuzzy."

I didn't quite get warm fuzzies from Message-ID 
<40172d47$0$1749$5a62ac22@freenews.iinet.net.au>, but it was good to see.  
The question was well-defined and the answer was succinct and accurate.  

-- 
David Wall


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

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:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#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 V10 Issue 6006
***************************************


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