How to install modules without ppm3 ?

2005-08-01 Thread Clement
Hello ,

I am trying to install the module Image::MagicK & GD,
however, I can't get it with ppm3, so I goto cpan.perl.org
I can find it, but I know to how to install the .tar.gz file.
Anybody help ?

Thanks!
Clement

RE: How to install modules without ppm3 ?

2005-08-01 Thread Tim Johnson

I'm assuming you're using Windows?


-Original Message-
From: Clement [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 01, 2005 1:30 AM
To: beginners@perl.org
Subject: How to install modules without ppm3 ?

Hello ,

I am trying to install the module Image::MagicK & GD,
however, I can't get it with ppm3, so I goto cpan.perl.org
I can find it, but I know to how to install the .tar.gz file.
Anybody help ?

Thanks!
Clement

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: How to install modules without ppm3 ?

2005-08-01 Thread Clement
O... sorry, forgot to mention, Yes, I am using Windows.
Any helps ? =)

Thanks!
Clement


-Original Message-

I'm assuming you're using Windows?


-Original Message-
From: Clement [mailto:perl[at]reborn.org]=20
Sent: Monday, August 01, 2005 1:30 AM
To: beginners[at]perl.org
Subject: How to install modules without ppm3 ?

Hello ,

I am trying to install the module Image::MagicK & GD,
however, I can't get it with ppm3, so I goto cpan.perl.org
I can find it, but I know to how to install the .tar.gz file.
Anybody help ?

Thanks!
Clement


Re: Read a single line in a file.

2005-08-01 Thread Tom Allison



Hi,

Use the script below:

open(FILE, $file_name);
my ($first, $second, $third, $fourth) = split /,/, ;
close FILE;

print $third;

Teddy




my ($word) = (split /,/, )[2];

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: How to install modules without ppm3 ?

2005-08-01 Thread angie ahl
This should tell you all you need to know (to do with installing
modules anyway ;)

http://search.cpan.org/~jhi/perl-5.8.0/pod/perlmodinstall.pod

HTH

Angie

On 8/1/05, Clement <[EMAIL PROTECTED]> wrote:
> O... sorry, forgot to mention, Yes, I am using Windows.
> Any helps ? =)
> 
> Thanks!
> Clement
> 
> 
> -Original Message-
> 
> I'm assuming you're using Windows?
> 
> 
> -Original Message-
> From: Clement [mailto:perl[at]reborn.org]=20
> Sent: Monday, August 01, 2005 1:30 AM
> To: beginners[at]perl.org
> Subject: How to install modules without ppm3 ?
> 
> Hello ,
> 
> I am trying to install the module Image::MagicK & GD,
> however, I can't get it with ppm3, so I goto cpan.perl.org
> I can find it, but I know to how to install the .tar.gz file.
> Anybody help ?
> 
> Thanks!
> Clement
>

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: 'Use Lib' problem...

2005-08-01 Thread Jeff 'japhy' Pinyan

On Jul 30, Tony Frasketi said:


 CGIDIR=$HOME/cgi-bin
 PMDIR=$CGIDIR/pm
 export CGIDIR PMDIR

Then in my CGI script I have...
 -
 use lib "$PMDIR";


No, you need to use $ENV{PMDIR} here.  Environment variables are stored in 
the %ENV hash.


--
Jeff "japhy" Pinyan %  How can we ever be the sold short or
RPI Acacia Brother #734 %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %-- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: escaping values (DBD::mysql)

2005-08-01 Thread Jeff 'japhy' Pinyan

On Jul 31, Octavian Rasnita said:


select ... limit 0,30;

but I cannot use:

$sth = $dbh->prepare("select ... limit ?,?");
$sth->execute(0, 30);

... because DBI replaces the values entered with '0' and '30' and the query
won't be valid.


No, you probably can't do that because your SQL engine doesn't allow 
placeholders in LIMIT.  All you need to do is make sure the values are 
non-negative integers, and you can write


  $sth = $dbh->prepare("select ... limit $start, $length");

If you need to escape things, you $dbh->quote(...).

--
Jeff "japhy" Pinyan %  How can we ever be the sold short or
RPI Acacia Brother #734 %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %-- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




ref / hash problem

2005-08-01 Thread Brent Clark

Hi list

I have my data as so (Thanks to Data::Dumper)

'Grac01' => {
'StndRm' => 'Standard Room',
'Suite' => 'Suite',
'Pent' => 'Penthouse'
  },

My code is as so.

foreach my $roomCode ( keys %{ $ref_hash->{$fileName} }){			# This works 
100%


foreach be( keys %{ $ref_hash->{$fileName}->{$roomCode} } ){
  # Not working
print "Ok HERE IT IS $_ \n";
}


I cant seem to get my second foreach to display the data of

Standard Room, or Suite etc.

If anyone would be kind to help me, it would be most appreciated.

Kind Regards
Brent Clark

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: ref / hash problem

2005-08-01 Thread John Doe
Brent Clark am Montag, 1. August 2005 16.42:
> Hi list
>
> I have my data as so (Thanks to Data::Dumper)
>
> 'Grac01' => {
>  'StndRm' => 'Standard Room',
>  'Suite' => 'Suite',
>  'Pent' => 'Penthouse'
>},
>
> My code is as so.
>
> foreach my $roomCode ( keys %{ $ref_hash->{$fileName} }){ 
> # This works
> 100%
>
>   foreach be( keys %{ $ref_hash->{$fileName}->{$roomCode} } ){
> # Not

What if you omit the "be"?
(do you write "use strict; use warnings" at the top of your script?)

> working print "Ok HERE IT IS $_ \n";

($_ then would contain the key; to get the value, you would use 

$ref_hash->{$fileName}->{$roomCode}->{$_};

in the print statement.
)


joe

>   }
>
>
> I cant seem to get my second foreach to display the data of
>
>   Standard Room, or Suite etc.
>
> If anyone would be kind to help me, it would be most appreciated.
>
> Kind Regards
> Brent Clark

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Using Config files and variables.

2005-08-01 Thread Dave Gray
On 7/31/05, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> problem is that the variables in the config are not being translated into
> there actual values before they get used.

So you have a plaintext config file with variable names in it that you
want perl to interpolate at some point once the config data is loaded.

> my $sth = $dbh->prepare(qq{$QUERY});
> #print "DEBUG: $QUERY\n";

What does this debug print give you?

> query= < SELECT N.IP_ADDRESS,
[snip]
>  AND   CAA.ADDRESS_ID   = AD.ADDRESS_ID
>  AND   P.NODE_ADDRESS  = $dslam
>  AND   N.IP_ADDRESS= $ip_address
> END

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: 'Use Lib' problem...

2005-08-01 Thread Dave Gray
On 7/26/05, Tony Frasketi <[EMAIL PROTECTED]> wrote:
> I'm trying to use the following 'use lib' statement as described at
>  http://www.unix.org.ua/orelly/perl/prog3/ch31_13.htm

It's not nice to link to pirated copies of books. BAD.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Some help needed in trying for my first "working" program of my own.

2005-08-01 Thread Zasinger
Hello beginners,

I'm  a  bit lost: I just installed perl yesterday and so far
it  seems  to  have  massive  and appealing potential, I can
hardly belive what I am seeing.

I'm  very, very rusty in any sort of coding having been away
from it for over 15 years. I've been working at learning all
about 3d model making in that time.

I  want to use Blitz3D to display some 3d representations of
weather.  It can't get the data I seek as far as I can tell,
but  perl  can it seems, and from what I've seen in 48 hours
it's very good at it indeed.

I'm now stuck:

I've so far got perl to use Net::FTP

I  can get perl to log in to weather.noaa.gov and drill down
to /data/observations/metar/decoded

I can get single files from there if I know their names, but
I'd  like  to  write  a  bit  of  code  (which  I am calling
freshen.plx at this point)

The  idea  is  that  it  would freshen my local copy of that
directory,  but  only  for  files  starting  with  "EG"  for
example.

I'm thinking I need some way to do the equivalent of mget (I
think  that is the regular ftp type command) and I'd like to
mget "EG*.TXT" as far as I can figure out.

I've  no idea how I'd do the wild card bit, so far it hasn't
worked out as I'd hoped it might.

It  seems that mget isn't implemented so I next thought that
a  directory  listing of that directory as a file might be a
good way to try next.

How might I do that?

I  guess I could then pick lines off that file one line at a
time  to  get these files one at a time? Although I'm not at
all clear how I'd manage that bit just yet! ;O)

If anyone can help me figure this out I'd be really glad.

I've  been working through some examples in "Beginning Perl"
and  it's fairly slow going and rather dry reading in places
and  some  of  it  is a bit out of date too it would seem. I
think  this  is  as  a  result  of me having .8 and it being
written  with  .6  as the latest and greatest at the time, I
get  the  feeling  some  stuff  has  changed  to  this books
detriment  perhaps.  Mostly by scanning through some remarks
in  the  latest  release notes (I think that was where I saw
them).  I've  no  idea yet if it's trivial to patch up older
code so it would work once again.

Also I got that impatience thing going on too as I've waited
a  couple of years to get at this thing, I'd started to feel
it  was  never going to happen but then perl happened to me,
making my weekend into a minor bedlam!! ;O)

-- 
Best regards,
 Zasinger  mailto:[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: 'Use Lib' problem...

2005-08-01 Thread Tony Frasketi

Sorry... Didn't notice that's what it was
Tony

Dave Gray wrote:


On 7/26/05, Tony Frasketi <[EMAIL PROTECTED]> wrote:
 


I'm trying to use the following 'use lib' statement as described at
http://www.unix.org.ua/orelly/perl/prog3/ch31_13.htm
   



It's not nice to link to pirated copies of books. BAD.

 



Re: Some help needed in trying for my first "working" program of my own.

2005-08-01 Thread Wiggins d'Anconia
Zasinger wrote:
> Hello beginners,
>

Welcome...

> I'm  a  bit lost: I just installed perl yesterday and so far
> it  seems  to  have  massive  and appealing potential, I can
> hardly belive what I am seeing.
> 
> I'm  very, very rusty in any sort of coding having been away
> from it for over 15 years. I've been working at learning all
> about 3d model making in that time.
> 
> I  want to use Blitz3D to display some 3d representations of
> weather.  It can't get the data I seek as far as I can tell,
> but  perl  can it seems, and from what I've seen in 48 hours
> it's very good at it indeed.
> 
> I'm now stuck:
> 
> I've so far got perl to use Net::FTP
> 

Ok. Good choice of modules it is the defacto standard for doing FTP from
Perl.  I assume you have read the documentation for the module,
available at:

http://search.cpan.org/~gbarr/libnet-1.19/Net/FTP.pm

> I  can get perl to log in to weather.noaa.gov and drill down
> to /data/observations/metar/decoded
> 

Nice start.

> I can get single files from there if I know their names, but
> I'd  like  to  write  a  bit  of  code  (which  I am calling
> freshen.plx at this point)
> 
> The  idea  is  that  it  would freshen my local copy of that
> directory,  but  only  for  files  starting  with  "EG"  for
> example.
> 
> I'm thinking I need some way to do the equivalent of mget (I
> think  that is the regular ftp type command) and I'd like to
> mget "EG*.TXT" as far as I can figure out.
> 

To my knowledge 'mget' is usually just a command implemented by the
client and has no true FTP relation. Which is likely why you need to
emulate it directly with your own code.

> I've  no idea how I'd do the wild card bit, so far it hasn't
> worked out as I'd hoped it might.
> 
> It  seems that mget isn't implemented so I next thought that
> a  directory  listing of that directory as a file might be a
> good way to try next.
> 
> How might I do that?
> 
> I  guess I could then pick lines off that file one line at a
> time  to  get these files one at a time? Although I'm not at
> all clear how I'd manage that bit just yet! ;O)
> 

This sounds like a pretty good approach, so we need a directory listing
and way to loop over it checking filenames from the Net::FTP docs we
learn that the way to get a directory listing is,

my @file_list = $ftp->ls;

Now we need to loop over those checking for needed files,

foreach my $file (@file_list) {
  if ($file =~ /^EG.*\.TXT$/) {
 # found an EG file, get it
  }
}

In the above example I use a Regular Expression to test each filename to
see if the filename starts with 'EG' followed by zero or more
characters, and ending with '.TXT'. For more reading on regular expressions,

perldoc perlretut
perldoc perlre

That is the verbose way to do it. Some might suggest,

foreach my $file (grep /^EG.*\.TXT$/, $ftp->ls) {
  # found an EG file, get it
}

'grep' is a built-in that allows us to loop over a list pulling out
those items we want.

perldoc -f grep

Based on these examples and the docs I leave it as an exercise to make
this more efficient by pulling only those files that need to be updated.
The 'dir' method, or some combination of 'mdtm' and/or 'size' should
help, along with 'stat' on the local side.

perldoc -f stat

> If anyone can help me figure this out I'd be really glad.
> 
> I've  been working through some examples in "Beginning Perl"
> and  it's fairly slow going and rather dry reading in places
> and  some  of  it  is a bit out of date too it would seem. I
> think  this  is  as  a  result  of me having .8 and it being
> written  with  .6  as the latest and greatest at the time, I
> get  the  feeling  some  stuff  has  changed  to  this books
> detriment  perhaps.  Mostly by scanning through some remarks
> in  the  latest  release notes (I think that was where I saw
> them).  I've  no  idea yet if it's trivial to patch up older
> code so it would work once again.
> 

Haven't read it. If you find it unsatisfactory I (and most others here)
would recommend "Learning Perl, 4th Edition" from O'Reilly (aka "The
Llama"). The 4th is a brand new release.  There should be very few
things in a beginner's book that would have changed from 5.6 to 5.8
(really *any* release in the 5 series).

> Also I got that impatience thing going on too as I've waited
> a  couple of years to get at this thing, I'd started to feel
> it  was  never going to happen but then perl happened to me,
> making my weekend into a minor bedlam!! ;O)
> 

The archives of this list are also an excellent resource, be sure to
Google them before asking a question, there is a *good* chance it will
have already been answered (more than once).

Good luck, welcome to the world of Perl,

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Newbie help for Net::smpp

2005-08-01 Thread Claudio.
Hi

I need some help in the implementation of Net::smpp

Somebody have a sample about how retrieve the info of submit_sm_resp, next
to send a message?

i've reading the protocol specification from http://smsforum.net, and this
indicates that in the header retrieves the "command_status" field, but i've
not found a sample in perl that does it...

Anyone have tried this? i really apreciate any help about this...

Thanks!

Claudio.

PD: Sorry about my poor english...






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: print to a specific location in a file

2005-08-01 Thread Brian Volk
 

-Original Message-
From: Brian Volk 
Sent: Monday, August 01, 2005 11:03 AM
To: Beginners (E-mail)
Subject: print to a specific location in a file


Hi All~
 
Is it possible to open a file and print to a specific location in the file?
For example,  I have a 1K file and 0 - 511 is where the small description is
stored and starting in position 512 is the path to a pdf file  If I do
not have the path in position 512 the link will be broken on web site.  Pls
let me know if this is possible and where I can read about it.
 
Thanks!
 
Brian Volk


I think I found what I was looking for...  ( seek / read )  
 
#!/usr/local/bin/perl
 
use strict;
use warnings;
 
my $txt_file = "C:/brian/descriptions/product/small/70413.txt";
open (FILE, $txt_file) or die "can't open $txt_file: $!\n";
 
my $link;
 
seek (FILE, 256, 0);
read (FILE, $link, 150); 
 
print $link;
---
now I just hope I can open the file replace the data in that byte
position...  :~)
 
Thanks,
 
Brian 



RE: How to install modules without ppm3 ?

2005-08-01 Thread Brian Volk


> -Original Message-
> From: Clement [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 01, 2005 3:53 AM
> To: "Tim Johnson"
> Cc: beginners@perl.org
> Subject: Re: How to install modules without ppm3 ?
> 
> 
> O... sorry, forgot to mention, Yes, I am using Windows.
> Any helps ? =)
> 
> Thanks!
> Clement
> 
> 
> -Original Message-
> 
> I'm assuming you're using Windows?
> 
> 
> -Original Message-
> From: Clement [mailto:perl[at]reborn.org]=20
> Sent: Monday, August 01, 2005 1:30 AM
> To: beginners[at]perl.org
> Subject: How to install modules without ppm3 ?
> 
> Hello ,
> 
> I am trying to install the module Image::MagicK & GD,
> however, I can't get it with ppm3, so I goto cpan.perl.org
> I can find it, but I know to how to install the .tar.gz file.
> Anybody help ?
> 
> Thanks!
> Clement

Here is the link I used to install Image Magick on Windows...  A lot of good
documentation too... 

http://studio.imagemagick.org/script/index.php

Brian  

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




print to a specific location in a file

2005-08-01 Thread Brian Volk
Hi All~
 
Is it possible to open a file and print to a specific location in the file?
For example,  I have a 1K file and 0 - 511 is where the small description is
stored and starting in position 512 is the path to a pdf file  If I do
not have the path in position 512 the link will be broken on web site.  Pls
let me know if this is possible and where I can read about it.
 
Thanks!
 
Brian Volk
HP Products
317.298.9950 x1245
  [EMAIL PROTECTED]
 


Re: print to a specific location in a file

2005-08-01 Thread John W. Krahn
Brian Volk wrote:
>  
> Is it possible to open a file and print to a specific location in the file?
> For example,  I have a 1K file and 0 - 511 is where the small description is
> stored and starting in position 512 is the path to a pdf file  If I do
> not have the path in position 512 the link will be broken on web site.  Pls
> let me know if this is possible and where I can read about it.
>  
> I think I found what I was looking for...  ( seek / read )  
>  
> #!/usr/local/bin/perl
>  
> use strict;
> use warnings;
>  
> my $txt_file = "C:/brian/descriptions/product/small/70413.txt";
> open (FILE, $txt_file) or die "can't open $txt_file: $!\n";
>  
> my $link;
>  
> seek (FILE, 256, 0);
> read (FILE, $link, 150); 
>  
> print $link;
> ---
> now I just hope I can open the file replace the data in that byte
> position...  :~)

1)  You need to open the file for both read and write.

open FILE, '+<', $txt_file or die ...;

2)  You probably need to remove/add trailing padding when
reading/writing the data.

perldoc -f pack
perldoc -f unpack
perldoc -f substr

3)  You should verify all system calls including seek() and read().

4)  You should probably include the seek macros from the Fcntl module.



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




reference trouble

2005-08-01 Thread Tom Allison

I'm trying to convert a hash of hashes to an array of hashes...

$hash isa hash reference...

my $array;
while ( my ($k, $v) = each %$hash ) {
my $u = str2time($k);  #convert to unix timestamp
$$array[$u] = $v;
}

result...
Segmentation Fault  (core dumped)...

Do I need to predeclare $array = *array{ARRAY} ?

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: reference trouble

2005-08-01 Thread Tim Johnson


I think you need to explain a little better what you're trying to do
here, and what you EXPECT to happen.  For one thing, why are you using
$u as your array index?  Are you sure you don't want a hash?



-Original Message-
From: Tom Allison [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 01, 2005 5:07 PM
To: beginners perl
Subject: reference trouble

I'm trying to convert a hash of hashes to an array of hashes...

$hash isa hash reference...

my $array;
while ( my ($k, $v) = each %$hash ) {
my $u = str2time($k);  #convert to unix timestamp
$$array[$u] = $v;
}



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: reference trouble

2005-08-01 Thread Jeff 'japhy' Pinyan

On Aug 1, Tom Allison said:


I'm trying to convert a hash of hashes to an array of hashes...

my $array;
while ( my ($k, $v) = each %$hash ) {
my $u = str2time($k);  #convert to unix timestamp
$$array[$u] = $v;
}

result...
Segmentation Fault  (core dumped)...


The problem is that $u, your array index, is an ENORMOUS integer.  You 
need to find some other way to index your array.


--
Jeff "japhy" Pinyan %  How can we ever be the sold short or
RPI Acacia Brother #734 %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %-- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: reference trouble

2005-08-01 Thread Tom Allison

Tim Johnson wrote:


I think you need to explain a little better what you're trying to do
here, and what you EXPECT to happen.  For one thing, why are you using
$u as your array index?  Are you sure you don't want a hash?




Well, I was expecting to be able to store numbers in an array so that 
the indexes would be in sort order.  But the numbers prove to be too large.


I've changed it out to a hash and create a seperate array of keys that 
are sorted:


my @keys = sort { $b <=> $a } keys %hash

And this works just fine.

But I still have some more learning to do on refs...

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: reference trouble

2005-08-01 Thread Tim Johnson

It looks like you've made a lot of headway on refs, don't sell yourself
short.  It just looks like maybe you needed to back away from the
problem and see that the reason why it wasn't working was that you were
trying to stick a square peg in a round hole, so to speak.  It's easy to
do when you're dealing with that level of abstraction, which is where
references trip a lot of people up.

Also, your question could have been a little clearer.  Without giving
away any proprietary information, some background as to what you were
trying to do would have been nice.  It looks like what you really wanted
was a way to store by a named index because then you would have a
pre-sorted list of indexes.  Whenever you find yourself tempted to do
something like this, it might be worth thinking about whether a hash
might suit you better.  Of course, your email was kind of cryptic, so
it's hard to tell.





-Original Message-
From: Tom Allison [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 01, 2005 7:03 PM
To: Tim Johnson
Cc: beginners perl
Subject: Re: reference trouble

[Tim Johnson] 

I've changed it out to a hash and create a seperate array of keys that 
are sorted:

my @keys = sort { $b <=> $a } keys %hash

And this works just fine.

But I still have some more learning to do on refs...

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




ANNOUNCE: Axis Not Evil 0.2 ( Gtk2::Ex::DBI, Gtk2::Ex::Datasheet::DBI, PDF::ReportWriter )

2005-08-01 Thread Daniel Kasak

Greetings.

I'm pleased to announce a round of upgrades to the packages making up 
Axis Not Evil:

http://entropy.homelinux.org/axis_not_evil

Axis Not Evil is a suit of open-source, cross-platform Perl modules that 
combine to provide an alternative to a /'leading'/ software vendor's RAD 
design tool for database access.


Gtk2::Ex::Datasheet::DBI and PDF::ReportWriter have had *major* 
upgrades, while Gtk2::Ex::DBI has had some minor features added, and 
been cleaned up.


All 3 modules are available separately, or as a bundle ( version 0.2 ).

Note that there are still issues installing under Windows, as I rely on 
Gtk2::Ex::Dialogs, which in turn uses Gnome2 ... which isn't available 
under Windows. If you encounter this problem, edit comment out all the 
stuff in Gtk2::Ex::Dialogs that refers to Gnome2 - I don't use anything 
that needs Gnome2, and everything will run fine with only 2 or 3 lines 
commented out. Email me if you need help / a hacked-up version.


Changelogs:

Gtk2::Ex::DBI-1.1

- Ask user if they want to apply changes to current record before 
requerying ( ie don't simply apply without asking )
- Add $sth->finish commands throughout to make things more SQLServer 
friendly when using DBD::ODBC with FreeTDS
- INCOMPATIBLE CHANGE: Automatically move to a new position when the 
record spinner is clicked

- Add missing $self->paint_calculated call at the end of $self->paint
- Added debug key to dump some info to the terminal
- Added calculator dialog to right-click menu of Gtk2::Entry widgets
- Withdrew claim that we work with SQL Server ( see man page )
- Removed unnecessary documentation of internal functions
- Removed support for Gnome2::DateEdit, which is not suitable for 
database use due to it's handling of NULL values

   See http://bugzilla.gnome.org/show_bug.cgi?id=169787

Gtk2::Ex::Datasheet::DBI-0.7

- Added support for dynamic combos - ie combos whose options depend on 
the current row

- Disabled MOFO::CellRendererSpinButton ... not exactly working properly yet
- Add support for CellRendererCombos with a string ID ( previously only 
supported int IDs )
- Added undo() method - convenience function that basically does 
$self->query( undef, TRUE );
- Added MOFO::CellRendererDate - copied and pasted from Torsten 
Schoenfeld's example in the Gtk2 distribution

- Separated demo app from main package

PDF::ReportWriter-0.6

- Major, major rewrite. Many new features. Squashed *ALL* bugs I know of :)
- Fixed bug in resetting aggregate fields when entering a new group
- Fixed bug in colour_func when called on non-data stuff ( eg headers, 
footers, etc )

- Better comments in source, use constants for TRUE / FALSE
- Replaced $field->{picture} with $field->{image} hash
- Set $self->{default_font_size} to 12 if one isn't supplied
- Renamed internal variables for more consistancy
- Replaced $cell_spacing with dynamic calculation of 
$field->{text_whitespace} ( user can define own values )
- Replaced user-defined $self->{data}->{max_font_size} with calculated 
value - any max_font_size value you set will be overriden
- Added far more robust calculation of Y-space needed for current block 
of data
- Keep group headings with data ( ie don't print a group header at the 
bottom of a page ) ... FIGJAM
- Move down the page immediately *before* rendering each line, instead 
of after
- Added image scaling ... that actually works ( added dependancy on 
Image::Size )

- Added image alignment
- Recognise "center" as well as "centre" in alignment definition
- Get rid of warnings about unintialised variables ( 'no warnings' 
directive )
- Added support for colour background setting for cells - current 
options are 'box' or 'ellipse'

- Separated demo app from main package

I will be uploading the individual modules to cpan shortly.

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: error message with net::FTP

2005-08-01 Thread Tom Allison

Laurent Coudeur wrote:

-Original Message-
From: Owen [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2005 00:07

To: beginners@perl.org
Subject: Re: error message with net::FTP

On Thu, 28 Jul 2005 10:17:35 -0400
"Laurent Coudeur" <[EMAIL PROTECTED]> wrote:



I am having some trouble with net::FTP module I get this error message




Timeout at /usr/lib/perl5/5.8/Net/FTP.pm line 1001

the script list directories in a path
then loops and list subdirectories
I can connect and list files but as I try to ls into final 
sub-directory it hangs I get into the directory but cannot list


foreach (@list){
   $ftp->cwd();
   $ftp->cwd("$_");
   my @filelist=$ftp->ls($_) or print LOG "cannot get in project 
folder $_";




I wonder if your $_ is being clobbered, what happens if you try

foreach my $item(@list){
and replace all instances of $_ with $item




Thanks Owen I did that but it still does the same 
I have copied the script on a linux box Here (using windows most of the

time)
The script is actually fine (I added your suggestion to be safe but same
problems still occur).
It times out only in windows and only in blank directories. In linux I
get the or message in logs

Does anybody knows of a workaround short of adding a blank file in all
directories?

I have to run this on a windows box (unfortunatly)

Laurent




So on the empty directories you get something like this:

my @filelist=$ftp->ls($_)
returns undef?

If so, you can test for that and 'next'

my @filelist=$ftp->ls($_)
next unless @filelist;  # or something, it's late here.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: how to obtain a reference to array which is returned by a function without intermediate array?

2005-08-01 Thread Tom Allison


Well, since fetchrow_array() returns a list (not an array, and not an 
array ref), the best you can hope for right now is


  $self->[1] = [ $selectHandle->fetchrow_array() ];



How about?

$ary_ref  = $sth->fetchrow_arrayref;
push @$self, $ary_ref;

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Perl framework for windows-prob in makefile

2005-08-01 Thread Dhanashri Bhate
Hi,
Well, i do have Active State Perl installed on my machine.
I am trying to install Apache's http perl framework test suite! 


-> -Original Message-
-> From: Tim Johnson [mailto:[EMAIL PROTECTED]
-> Sent: Monday, August 01, 2005 11:01 AM
-> To: Anthony.leung; Dhanashri Bhate
-> Cc: Perl-Beginners (E-mail); Perl-Tips (E-mail)
-> Subject: RE: Perl framework for windows-prob in makefile
-> 
-> 
-> 
-> I know this doesn't answer your question, but I have to ask. 
->  If you're
-> on Windows, then why aren't you just installing ActivePerl from
-> ActiveState?  You're guaranteed to save yourself a lot of headache.
-> http://www.activestate.com.
-> 
-> 
-> 
-> -Original Message-
-> From: Anthony.leung [mailto:[EMAIL PROTECTED] 
-> Sent: Sunday, July 31, 2005 5:00 AM
-> To: Dhanashri Bhate
-> Cc: Perl-Beginners (E-mail); Perl-Tips (E-mail)
-> Subject: Re: Perl framework for windows-prob in makefile
-> 
-> [Tim Johnson] 
-> 
-> On Sat, 30 Jul 2005 11:06:32 +0530, Dhanashri Bhate wrote:
->  Hi!
->  I'm trying to get Perl framework installed on windows.
->  
-> [Tim Johnson] 
-> 
-> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Perl framework for windows-prob in makefile

2005-08-01 Thread Dhanashri Bhate
Yes! din't work though!

-> -Original Message-
-> From: Anthony.leung [mailto:[EMAIL PROTECTED]
-> Sent: Sunday, July 31, 2005 5:30 PM
-> To: Dhanashri Bhate
-> Cc: Perl-Beginners (E-mail); Perl-Tips (E-mail)
-> Subject: Re: Perl framework for windows-prob in makefile
-> 
-> 
-> No expert but from general unix exp have you tried "\" ?
-> 
-> 
-> On Sat, 30 Jul 2005 11:06:32 +0530, Dhanashri Bhate wrote:
->  Hi!
->  I'm trying to get Perl framework installed on windows.
->  
->  But the problem is in one of the makefiles...
->  don't know if this is the right place to ask this question, 
-> but could
-> not find any info anywhere else! :(
->  
->  in a makefile the char "" means line continuation, 
->  but if i have a macro  in the Makefile and i want to assign 
-> a value of
-> "" how do i do it?
->  
->  i tried these :
->  
->  DIRSEP = 
->  DIRSEP = \
->  DIRSEP = ""
->  DIRSEP = ''
->  
->  but all these don't seem to work!
->  
->  is there any way to let know that the ""that follows is NOT for line
-> continuation?
->  
->  Thanks
->  Dhanashri
->  
->  
->  
->  
-> 
-> 
-> -- 
-> XS2Mail: Check your mail anywhere 
http://www.xs2mail.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]