[29875] in Perl-Users-Digest
Perl-Users Digest, Issue: 1118 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 14 21:10:13 2007
Date: Fri, 14 Dec 2007 18:09:10 -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 Fri, 14 Dec 2007 Volume: 11 Number: 1118
Today's topics:
Archive::Zip on windows <ebmarquez@gmail.com>
Re: Archive::Zip on windows <ben@morrow.me.uk>
Bewildering perl parser bug <socyl@987jk.com.invalid>
Re: Bewildering perl parser bug <socyl@987jk.com.invalid>
Re: Bewildering perl parser bug xhoster@gmail.com
Free perl ebook | http://freepdf-ebook.blogspot.com/200 yuni.wijayanti@gmail.com
Re: Functions within regular expressions <ianw@dontneedspam.com>
Re: Functions within regular expressions <tzz@lifelogs.com>
Re: Functions within regular expressions <abigail@abigail.be>
Re: Functions within regular expressions <bik.mido@tiscalinet.it>
Re: most elegant way to split text file randomly into n <bik.mido@tiscalinet.it>
Re: Net::SSH::Perl - How to set remote default file per <glex_no-spam@qwest-spam-no.invalid>
Re: not sure why I am getting the following warning "Us <krahnj@telus.net>
Re: not sure why I am getting the following warning "Us <mcardeiro@yahoo.com>
Re: not sure why I am getting the following warning "Us <krahnj@telus.net>
Re: Performance of CGI Reduced xhoster@gmail.com
Re: Performance of CGI Reduced <noreply@gunnar.cc>
Re: Performance of CGI Reduced <1usa@llenroc.ude.invalid>
Re: Question about "undef'ing" variables <m@rtij.nl.invlalid>
Re: Question about "undef'ing" variables <1usa@llenroc.ude.invalid>
Re: simple bar chart module <tzz@lifelogs.com>
Re: Using the DBI to connect to an Oracle server w/o co <google@hoodfamily.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 14 Dec 2007 15:33:08 -0800 (PST)
From: ebm <ebmarquez@gmail.com>
Subject: Archive::Zip on windows
Message-Id: <47ba23c3-08e9-4331-a018-fd64c73e81b9@a35g2000prf.googlegroups.com>
I'm trying to have Archive::Zip zip a file on a windows systems. When
I create this file using the full path I end up with an empty zip
file.
Example:
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
my $file = 'c:/TEST.xls';
my $zip = Archive::Zip->new();
print STDOUT "Adding $file\n";
$zip->addFile($file) or warn "Error adding file $file\n";
die "write error." if $zip->writeToFileNamed ("c:/file.zip") !=
AZ_OK;
__END__
I will end up with c:/file.zip but it will be empty. Now If I copy
the xls file to the same directory the script is running in it will be
zipped into c:/file.zip. It seems to be something to do with the C:\
part of the path it doesn't like. The pod file says something about
using Unix file formats..... Am i screwed or is there a way around
this.
Is there a way around this problem. This is apart of a larger script
so I can't hard code any file names. Any ideas?
------------------------------
Date: Sat, 15 Dec 2007 01:12:39 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Archive::Zip on windows
Message-Id: <79mb35-u69.ln1@osiris.mauzo.dyndns.org>
Quoth ebm <ebmarquez@gmail.com>:
> I'm trying to have Archive::Zip zip a file on a windows systems. When
> I create this file using the full path I end up with an empty zip
> file.
> Example:
> use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
>
> my $file = 'c:/TEST.xls';
> my $zip = Archive::Zip->new();
> print STDOUT "Adding $file\n";
>
> $zip->addFile($file) or warn "Error adding file $file\n";
> die "write error." if $zip->writeToFileNamed ("c:/file.zip") !=
> AZ_OK;
>
> __END__
>
> I will end up with c:/file.zip but it will be empty. Now If I copy
> the xls file to the same directory the script is running in it will be
> zipped into c:/file.zip. It seems to be something to do with the C:\
> part of the path it doesn't like. The pod file says something about
> using Unix file formats..... Am i screwed or is there a way around
> this.
Try specifying a separate path to store the file as in the zip: a zip
member cannot have a volume specification. So:
$zip->addFile($file, 'TEST.xls');
or use File::Spec to split up the path and join it back together, sans
volume, as a Unix filespec.
Ben
------------------------------
Date: Fri, 14 Dec 2007 20:38:26 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: Bewildering perl parser bug
Message-Id: <fjupk2$cma$1@reader1.panix.com>
The following demo code causes the warning "Useless use of a constant
in a void context":
use strict;
use warnings;
{ ; package ABC; 1; }
sub foo {}
foo ABC->xyz, 2;
__END__
...because perl parses the last line as
ABC->foo->xyz, 2;
That's annoying enough, but what sends me for a loop is that if I
change the block
{ ; package ABC; 1 }
to
{ ; package PQR; 1 }
now the last line gets parsed as foo( ABC->xyz, 2 ), as any
reasonable, red-blooded parser would.
Now, why on earth would that "package ABC" statement confuse the
parser???
Of course, in this case I can clue in the parser by changing the
last line to
foo( ABC->xyz, 2 );
but this fix makes me uneasy, because it seems fixing the symptom
and not the cause, leaving me wondering about what else in the file
the parser will mess up (in fact this parsing error would have not
have been visible until runtime if the second argument to foo had
been a 1 or a 0 instead of a 2, because perl does not protest when
it finds either of those two values in a void context).
If there's a way to clue-in the parser that is closer to the source
of the error, please let me know.
TIA!
kj
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
------------------------------
Date: Fri, 14 Dec 2007 20:48:40 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: Re: Bewildering perl parser bug
Message-Id: <fjuq78$q7r$1@reader1.panix.com>
Sorry, I neglected to specify the version of perl I'm using:
% perl -v
This is is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi
...
kj
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
------------------------------
Date: 14 Dec 2007 23:13:37 GMT
From: xhoster@gmail.com
Subject: Re: Bewildering perl parser bug
Message-Id: <20071214181339.839$er@newsreader.com>
kj <socyl@987jk.com.invalid> wrote:
> The following demo code causes the warning "Useless use of a constant
> in a void context":
>
> use strict;
> use warnings;
>
> { ; package ABC; 1; }
>
> sub foo {}
>
> foo ABC->xyz, 2;
>
> __END__
>
> ...because perl parses the last line as
>
> ABC->foo->xyz, 2;
>
> That's annoying enough, but what sends me for a loop is that if I
> change the block
>
> { ; package ABC; 1 }
>
> to
>
> { ; package PQR; 1 }
>
> now the last line gets parsed as foo( ABC->xyz, 2 ), as any
> reasonable, red-blooded parser would.
>
> Now, why on earth would that "package ABC" statement confuse the
> parser???
See the discussion of indirect object syntax in perldoc perlobj.
The previously defined subroutine foo primes perl to recognize subroutine
calls without parentheses. The previously defined package ABC primes perl
to recognize indirect object syntax calls for ABC. Apparently, the latter
takes precedence over the former.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Fri, 14 Dec 2007 12:58:17 -0800 (PST)
From: yuni.wijayanti@gmail.com
Subject: Free perl ebook | http://freepdf-ebook.blogspot.com/2007/12/tech-perl-programming-in-21-days.html
Message-Id: <9a09b192-6efe-4257-bfc6-0f1e62c97f38@s19g2000prg.googlegroups.com>
hi,
do you need reference for perl programming, quick download now! FREE !
i am promise
------------------------------
Date: Fri, 14 Dec 2007 18:34:28 -0000
From: "IanW" <ianw@dontneedspam.com>
Subject: Re: Functions within regular expressions
Message-Id: <fjuii4$11su$1@energise.enta.net>
"Abigail" <abigail@abigail.be> wrote in message
news:slrnfm51o0.1sh.abigail@alexandra.abigail.be...
> You don't want to execute a function from your regular expression,
> instead, what you want is to do some action in the replacement.
>
> That's an important difference.
>
> I would write it as:
>
> s/(Item \d+ cost is: )(.+)\n/$1 . formatPrice ($2)/eg;
That works nicely. Thanks :)
> or, if I were to write it next week, after the release of 5.10:
>
> s/Item \d+ cost is: \K(?<price>.+)(?=\n)/formatPrice ($+ {price})/eg;
Oo, just read up on \K - very neat. Not sure I get the bit afterwards
though.. "<price>" is presumably a way of naming the bracket match
variables, but not sure what it's advantage is over this:
s/Item \d+ cost is: \K(.+?)(?=\n)/formatPrice($1)/eg;
Ian
------------------------------
Date: Fri, 14 Dec 2007 13:15:02 -0600
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Functions within regular expressions
Message-Id: <86k5nh84w9.fsf@lifelogs.com>
On Fri, 14 Dec 2007 18:34:28 -0000 "IanW" <ianw@dontneedspam.com> wrote:
I> "Abigail" <abigail@abigail.be> wrote in message
I> news:slrnfm51o0.1sh.abigail@alexandra.abigail.be...
>> s/Item \d+ cost is: \K(?<price>.+)(?=\n)/formatPrice ($+ {price})/eg;
I> Oo, just read up on \K - very neat. Not sure I get the bit afterwards
I> though.. "<price>" is presumably a way of naming the bracket match
I> variables, but not sure what it's advantage is over this:
I> s/Item \d+ cost is: \K(.+?)(?=\n)/formatPrice($1)/eg;
Look through the introduction Yves Orton wrote:
http://www.regex-engineer.org/slides/perl510_regex.html
The advantage is a) clarity, and b) no more $1 $2 $3 renumbering when
you add a new match in the middle...
Ted
------------------------------
Date: 14 Dec 2007 19:37:56 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: Functions within regular expressions
Message-Id: <slrnfm5msk.1sh.abigail@alexandra.abigail.be>
_
Ted Zlatanov (tzz@lifelogs.com) wrote on VCCXVIII September MCMXCIII in
<URL:news:86k5nh84w9.fsf@lifelogs.com>:
~~ On Fri, 14 Dec 2007 18:34:28 -0000 "IanW" <ianw@dontneedspam.com> wrote:
~~
~~ I> "Abigail" <abigail@abigail.be> wrote in message
~~ I> news:slrnfm51o0.1sh.abigail@alexandra.abigail.be...
~~
~~ >> s/Item \d+ cost is: \K(?<price>.+)(?=\n)/formatPrice ($+ {price})/eg;
~~
~~ I> Oo, just read up on \K - very neat. Not sure I get the bit afterwards
~~ I> though.. "<price>" is presumably a way of naming the bracket match
~~ I> variables, but not sure what it's advantage is over this:
~~
~~ I> s/Item \d+ cost is: \K(.+?)(?=\n)/formatPrice($1)/eg;
~~
~~ Look through the introduction Yves Orton wrote:
~~
~~ http://www.regex-engineer.org/slides/perl510_regex.html
Or http://perl.abigail.be/Talks/RE5.10/HTML/title.html, which is a
rework of Yves presentation, and the slides we used when we copresented
the talk in Vienna.
~~ The advantage is a) clarity, and b) no more $1 $2 $3 renumbering when
~~ you add a new match in the middle...
Right.
Abigail
--
:;$:=~s:
-:;another Perl Hacker
:;chop
$:;$:=~y
:;::d;print+Just.
$:;
------------------------------
Date: Fri, 14 Dec 2007 22:08:33 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Functions within regular expressions
Message-Id: <m5s5m3hnv2c2v0plt3o6s3heh6p81h35tr@4ax.com>
On Fri, 14 Dec 2007 18:34:28 -0000, "IanW" <ianw@dontneedspam.com>
wrote:
>> s/Item \d+ cost is: \K(?<price>.+)(?=\n)/formatPrice ($+ {price})/eg;
>
>Oo, just read up on \K - very neat. Not sure I get the bit afterwards
>though.. "<price>" is presumably a way of naming the bracket match
>variables, but not sure what it's advantage is over this:
>
>s/Item \d+ cost is: \K(.+?)(?=\n)/formatPrice($1)/eg;
The advantage is that $+{price} sounds much like a price.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Fri, 14 Dec 2007 22:07:15 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: most elegant way to split text file randomly into n parts?
Message-Id: <d2s5m3l129lr6avmjfce32se5f5kqdvqt4@4ax.com>
On Fri, 14 Dec 2007 08:35:01 -0600, Ted Zlatanov <tzz@lifelogs.com>
wrote:
>MD> my @nums = map 1+$alpha*rand, 1..$n;
>
>I think Perl's rand() is uniformly distributed so this should be OK
>without the extra normalization, but as I mentioned in my other reply
>the word "about" is too imprecise to bother trying to guess what the OP
>really meant.
I meant to "normalize" in the sense of making the sum of @nums equal
to the total number of lines.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Fri, 14 Dec 2007 11:29:11 -0600
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Net::SSH::Perl - How to set remote default file permissions
Message-Id: <4762bd67$0$3567$815e3792@news.qwest.net>
Joe wrote:
> On Dec 13, 12:53 pm, Joe <zhilian...@gmail.com> wrote:
>> When I manually execute a script with Net::SSH::Perl to run a remote
>> program, the output file has a permission "660"; When I use a web
>> server to execute the script (the script uses my user account identity/
>> pass), the remote output file has a permission "600".
>>
>> How can I make the script to set a default remote file permission
>> (like "644") so the web server can read the results back? I tried:
>> ($stdout, $stderr, $exit) = $ssh->cmd("umask 022; script");
>> and it didn't work.
>
> Well, a reply to myself - I accomplished this by
> ($stdout, $stderr, $exit) = $ssh->cmd("script; chmod 644 'outfile'");
Probably better to have 'script' do the chomd, just in case 'outfile'
ever changes within 'script'.
------------------------------
Date: Fri, 14 Dec 2007 17:40:00 GMT
From: "John W. Krahn" <krahnj@telus.net>
Subject: Re: not sure why I am getting the following warning "Useless use of a constant in void context"
Message-Id: <4762BFEB.40B2D199@telus.net>
"mcardeiro@yahoo.com" wrote:
>
> On Dec 13, 1:52 pm, Ben Morrow <b...@morrow.me.uk> wrote:
>
> > As John said, this is a precedence error: get into the habit of always
> > using 'and' and 'or' for flow control, not && and ||.
>
> this is not a problem as error_page() causes the script to exit (I
> should have changed it to "die" in my post for clarity)
Just because it "works", for some value of "works", does not mean it is
the correct way to do it.
John
--
use Perl;
program
fulfillment
------------------------------
Date: Fri, 14 Dec 2007 12:37:10 -0800 (PST)
From: "mcardeiro@yahoo.com" <mcardeiro@yahoo.com>
Subject: Re: not sure why I am getting the following warning "Useless use of a constant in void context"
Message-Id: <bccfc0df-e406-42f9-a84d-49ef36929eb6@t1g2000pra.googlegroups.com>
On Dec 14, 12:40 pm, "John W. Krahn" <kra...@telus.net> wrote:
> Just because it "works", for some value of "works", does not mean it is
> the correct way to do it.
>
what exactly is incorrect about saying run a subroutine and assign the
return to a variable or exit?
Mike Cardeiro
------------------------------
Date: Fri, 14 Dec 2007 20:44:29 GMT
From: "John W. Krahn" <krahnj@telus.net>
Subject: Re: not sure why I am getting the following warning "Useless use of a constant in void context"
Message-Id: <4762EB28.AD8E2993@telus.net>
"mcardeiro@yahoo.com" wrote:
>
> On Dec 14, 12:40 pm, "John W. Krahn" <kra...@telus.net> wrote:
>
> > Just because it "works", for some value of "works", does not mean it is
> > the correct way to do it.
>
> what exactly is incorrect about saying run a subroutine and assign the
> return to a variable or exit?
I was commenting on the use of '||' instead of 'or' for flow control.
That the subroutine in question uses 'exit()' is just a side effect.
You shouldn't rely on side effects for flow control.
John
--
use Perl;
program
fulfillment
------------------------------
Date: 14 Dec 2007 16:12:23 GMT
From: xhoster@gmail.com
Subject: Re: Performance of CGI Reduced
Message-Id: <20071214111224.379$rC@newsreader.com>
Praki <visitprakashindia@gmail.com> wrote:
> Hi All,
>
> when i use
>
> use CGI;
> use CGI::Session;
> use Net::LDAP;
>
> in my cgi file the performance is reduced.
As compared to what? Using none of the above? Using one of the above?
Using two of the above?
> i mean it takes more time
> to get load every time and all the pages where ever i use this .
> why it is happening ? is there any other alternative for this...
mod_perl, for example. See the FAQ "How can I make my CGI script more
efficient?"
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Fri, 14 Dec 2007 21:10:09 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Performance of CGI Reduced
Message-Id: <5sg65eF192aisU1@mid.individual.net>
Petr Vileta wrote:
> Praki wrote:
>> when i use
>>
>> use CGI;
>> use CGI::Session;
>> use Net::LDAP;
>>
>> in my cgi file the performance is reduced. i mean it takes more time
>> to get load every time and all the pages where ever i use this .
>> why it is happening ? is there any other alternative for this...
>
> You can use part only
>
> use CGI qw(:cgi);
> or
> use CGI qw(:standard);
> or other part you need.
That would import a bunch of symbols, and I don't understand how it
would improve performance.
To the OP: As others have mentioned, you may want to run the program
under mod_perl. Otherwise, as long as you run it as a plain CGI script,
and if speed is an issue, avoid using CGI.pm.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sat, 15 Dec 2007 00:32:01 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Performance of CGI Reduced
Message-Id: <Xns9A06C6B55B2Casu1cornelledu@127.0.0.1>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in news:5sg65eF192aisU1
@mid.individual.net:
> Petr Vileta wrote:
>> Praki wrote:
>>> when i use
>>>
>>> use CGI;
>>> use CGI::Session;
>>> use Net::LDAP;
>>>
>>> in my cgi file the performance is reduced. i mean it takes more time
...
>> You can use part only
>>
>> use CGI qw(:cgi);
>> or
>> use CGI qw(:standard);
>> or other part you need.
>
> That would import a bunch of symbols, and I don't understand how it
> would improve performance.
Given that most of the penalty for using CGI.pm comes from having to
load, parse and compile that behemoth, changing the set of imported
routines would, as you point out, not increase performance.
>
> To the OP: As others have mentioned, you may want to run the program
> under mod_perl. Otherwise, as long as you run it as a plain CGI
> script, and if speed is an issue, avoid using CGI.pm.
And one very good way to avoid CGI.pm (so long as one does not need the
HTML generation methods) is to use CGI::Minimal:
http://search.cpan.org/~snowhare/CGI-Minimal-1.29/lib/CGI/Minimal.pod
I would still prefer to go with a CPAN module than home-brew solutions.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
------------------------------
Date: Fri, 14 Dec 2007 19:04:00 +0100
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Question about "undef'ing" variables
Message-Id: <pan.2007.12.14.18.04.00@rtij.nl.invlalid>
On Fri, 14 Dec 2007 16:32:38 +0100, Petr Vileta wrote:
> Martijn Lievaart wrote:
>> On Thu, 13 Dec 2007 22:40:23 -0500, somebody wrote:
>>
>>> In the code snippet below, I process each line of a file using the
>>> split command. After the variables $a, $b, $c, and $d are used, I
>>> need to
>>
>> Don't use $a and $b, they're magic. I understand this is just an
>
> Ehm, $a and $b are magic for Perl 5.8.x, not for Perl 5.6.x, and I think
> this was be a stupid idea. Maybe could be used some like $_a and $_b or
> $__ and $___ . But now is too late :-(
Ehm, 5.6 certainly used $a and $b in the same way. It introduced the
possibility to use prototypes to avoid namespace problems, but that is
something wholly different.
M4
------------------------------
Date: Sat, 15 Dec 2007 00:37:29 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Question about "undef'ing" variables
Message-Id: <Xns9A06C7A2E365Dasu1cornelledu@127.0.0.1>
"Petr Vileta" <stoupa@practisoft.cz> wrote in
news:fju8j6$g9a$4@ns.felk.cvut.cz:
> Martijn Lievaart wrote:
>> On Thu, 13 Dec 2007 22:40:23 -0500, somebody wrote:
>>
>>> In the code snippet below, I process each line of a file using the
>>> split command. After the variables $a, $b, $c, and $d are used, I
>>> need to
>>
>> Don't use $a and $b, they're magic. I understand this is just an
>
> Ehm, $a and $b are magic for Perl 5.8.x, not for Perl 5.6.x, and I
> think this was be a stupid idea. Maybe could be used some like $_a and
> $_b or $__ and $___ . But now is too late :-(
You hardly ever make much sense.
Now, the magic $a and $b are package variables. Even in situations where
it is perfectly safe to declare lexically scoped variables named $a and
$b, I would avoid using them because of the potential for confusion.
However, that does not make names such as $_a or $___ any less silly.
What is wrong with the tail end of the alphabet?
my ($x, $y, $z, $w);
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
------------------------------
Date: Fri, 14 Dec 2007 11:10:59 -0600
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: simple bar chart module
Message-Id: <86prx98an0.fsf@lifelogs.com>
On Fri, 14 Dec 2007 15:19:03 +0000 Ben Morrow <ben@morrow.me.uk> wrote:
BM> Quoth smallpond <smallpond@juno.com>:
>> On Dec 14, 9:50 am, joe <jcha...@gmail.com> wrote:
>> > Hello does anyone know of any simple bar chart module without GD. I
>> > would use GD but it look like I have to compile a few things to get it
>> > working. So i am trying to find something easy like text graph module.
>> > Any ideas?
>>
>> I haven't tried it, but Tk::Graph looks to be pure perl.
BM> Well, yes, but it depends on Tk, which isn't.
BM> To the OP: what do you actually want? As in, what sort of output do you
BM> want? If you want an image, you're unlikely to find a non-XS module that
BM> will help; similarly if you want your program to open a window. If
BM> you're happy with a textual output format like SVG, then there's
BM> SVG::TT::Graph.
Google has recently released a Charts API, and there's even a
Google::Chart module on CPAN (although it's not yet fully functional).
So that's a non-XS method that's pretty fast if you can get to the
Google servers and produces nice PNG images...
Ted
------------------------------
Date: Fri, 14 Dec 2007 17:08:00 -0800 (PST)
From: Tim <google@hoodfamily.org>
Subject: Re: Using the DBI to connect to an Oracle server w/o connecting to a database
Message-Id: <01bf2e8b-269a-4901-88ff-e959439209c7@i29g2000prf.googlegroups.com>
On Dec 13, 6:57 pm, Ron Bergin <r...@i.frys.com> wrote:
> > > Quoth Tim <goo...@hoodfamily.org>:
>
> > The reason boils down to the fact that Sybase doesn't allow connecting
> > to a database from the connect call, but requires a separate
> > subsequent call. I was hoping to write some perl code portable enough
> > that when the time comes to switch this particular database from
> > Sybase to Oracle I wouldn't have to modify perl code.
>
> You, apparently, haven't tried using the DBI (with DBD::Sybase) to
> connect to your database.
>
> http://search.cpan.org/~mewp/DBD-Sybase-1.08/Sybase.pm
Well, I have, but my problem was that I read Sybase documentation that
said to "use database" and when I read the DBD::Sybase perldoc:
"...Specify the database within the server that should be made the
default database (via "use $database")." that only reinforced my
misunderstanding. I now understand that statement to mean that the
connect will automatically perform a "use $database" for me if I put
the :database= in the connect string.
------------------------------
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 V11 Issue 1118
***************************************