Hi Kenneth,

On Thursday 01 Apr 2010 05:49:06 CHAN, KENNETH 1 [AG/7721] wrote:
> Thanks Shlomi, it's clear to me about the umask() now.

Nice.

> Regarding the perl version, I am using the perl come with the Suse Linux
> in my company. Will it be a big job to update the Perl and making sure
> other installed modules (dependencies) working fine? 

It depends on whether updates for the system's perl are available on your Suse 
Linux version. If it's a still supported version of Suse, then this perl 
version is likely patched with many vendor patches, which could partially 
substitute for upgrading Perl (assuming the distributor is doing a good job.). 

If you still want to upgrade the system perl then the easiest way would be to 
upgrade your distribution's version (which naturally will upgrade the versions 
of all the other software packages.), or use a backports package that is 
supported by your distributor.

Note that with some distributions of Linux, the BSDs, etc. the general 
recommendation is to leave the system perl alone and install a dedicated perl 
from sources on a different prefix (say /opt/perl5). I am happy with the 
Mandriva's system perl, and the Debian/Ubuntu perl also has a good reputation, 
but the Fedora/RHEL/CentOS/etc. perl is known to be problematic. I'm not sure 
about SUSE in that respect.

> Can you please
> guide me to some good resources on how to do it? Or can I only reinstall
> the GD distribution and how? Thanks heaps.
> 

To install perl from source on a different prefix you can use a script like 
that:

<<<
#!/bin/sh
rm -f config.sh Policy.sh
sh Configure -de -Dprefix=/opt/perl-5.10.1
>>>

It's adapted from a different script and not really tested.

In regards to the GD package, I suggest consulting the SUSE support channels 
on IRC (see http://perl-begin.org/irc/ ), dedicated mailing lists, etc. to get 
it resolved. I hope you are using a still maintained version of Suse Linux, 
else neither the distributor nor I will be willing to help you.

Regards,

        Shlomi Fish

P.S: one of my programs just had a really exciting development:

http://fc-solve.blogspot.com/2010/03/01-april-2010-freecell-solver.html

> Regards,
> Kenneth
> 
> 
> 
> -----Original Message-----
> From: Shlomi Fish [mailto:shlo...@iglu.org.il]
> Sent: Wednesday, March 31, 2010 5:18 PM
> To: beginners@perl.org
> Cc: CHAN, KENNETH 1 [AG/7721]
> Subject: Re: function umask() and problem in GD::image->png
> 
> Hi Kenneth,
> 
> On Wednesday 31 Mar 2010 11:34:37 CHAN, KENNETH 1 [AG/7721] wrote:
> > Hi all,
> > 
> >   I have 2 simple questions (maybe be very trial):
> > 1. I saw some code put "umask 022;" in the near beginning of perl
> > script. I understand that umask is for changing the file permission in
> > unix/linux. However, if I put "umask 002" in the beginning of a perl
> > script, after execution, the file permission is not changed to 002. So
> > what is the purpose of using this command in perl since it does not
> > change the actual file permission?
> 
> Actually, the umask affects permissions of the files created in the
> future,
> such as with http://perldoc.perl.org/functions/open.html . See:
> 
> http://en.wikipedia.org/wiki/Umask
> 
> > 2. I tried the simple example in the GD.pm documentation:
> > http://search.cpan.org/~lds/GD-2.35/GD.pm
> > Perl shows me the errors on the line of "print $im->png;": Can't
> 
> locate
> 
> > object method "png" via package "GD::Image" .....
> > The perl version in the server is: v5.8.8
> > What is the problem? And how should I debug it?
> > 
> >   Thanks in advance.
> 
> Since the "use GD;" did not fail, I guess you have GD.pm but the GD
> distribution was not installed properly. The GD distribution should work
> on
> perl-5.8.8, although perl-5.8.8 is pretty old (and buggy). What is your
> OS,
> distro, how-did-you-install-perl, etc.? Maybe you've missed some C
> libraries
> when installing the GD distribution (such as libpng).
> 
> Regards,
> 
>       Shlomi Fish
> 
> > Regards,
> > Kenneth

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
"Star Trek: We, the Living Dead" - http://shlom.in/st-wtld

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to