[22969] in Perl-Users-Digest
Perl-Users Digest, Issue: 5189 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 7 14:09:55 2003
Date: Mon, 7 Jul 2003 11:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 7 Jul 2003 Volume: 10 Number: 5189
Today's topics:
Re: Apache/Perl segfaulting on system calls <glex_nospam@qwest.net>
Re: How can I analyse jpg file with perl? <jurgenex@hotmail.com>
How differ these lwp queries? dkoleary@attbi.com
Re: How do I clone a structure? <nobull@mail.com>
Re: How do I clone a structure? (Greg Bacon)
Re: How to secure Perl scripts from spammers? <usenet@expires082003.tinita.de>
Re: How to secure Perl scripts from spammers? <gregs@trawna.com>
looking for low-cost programmer via internet (vanselow)
LWP, cookies, and adding to request string (Chris)
my first japh (Bryan Castillo)
Re: my first japh <go@away.spam>
Re: naming hash using a variable name. <nanae@perusion.com>
Re: naming hash using a variable name. <g4rry_short@zw4llet.com>
Naming some arrays in a foreach loop?! (Thomas Becker)
Re: Naming some arrays in a foreach loop?! (Greg Bacon)
oneliner failed on Win2k with space in path name (Xu Yang)
Re: oneliner failed on Win2k with space in path name <gregs@trawna.com>
Problem installing Win32::SerialPort <spikey-wan@bigfoot.com>
Question about Devel::Cover (Himal)
Re: Question about Devel::Cover <usenet@expires082003.tinita.de>
Re: reading header? results from another script <nobull@mail.com>
Re: Reading JPEG file (Bryan Castillo)
references => how not to destroy my data ? (Jan)
Re: references => how not to destroy my data ? (Randal L. Schwartz)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 07 Jul 2003 10:42:39 -0500
From: "J. Gleixner" <glex_nospam@qwest.net>
Subject: Re: Apache/Perl segfaulting on system calls
Message-Id: <axgOa.610$YN.18826@news.uswest.net>
Jeff wrote:
> The apache child sporadically dies at any type of system call in any
> context that we use (perl module, HTML::Mason)
>
> open IN, "swift -d $file | " or warn "could not execute swift $file";
> my $usage = `du -Sh $rootDir`;
> my $n = system("rsync $src $dest");
>
> I tried looking in the error logs... I'm getting lines that look like
> this:
> [Thu Jul 3 18:57:03 2003] [notice] child pid 389 exit signal
> Segmentation fault (11)
>
> I've also tried to setting the MaxRequestPerChild in apache to 0 but
> that didn't work either. I don't think it has anything to do with the
> way perl cleans up.
>
> -Jeff
>
> "J. Gleixner" <glex_nospam@qwest.net> wrote in message news:<xV0Na.43$hO4.88593@news.uswest.net>...
>
>>Jeff wrote:
>>
>>>I seem to be getting sporadic segfaults when I make system calls in
>>>mod_perl. They are happening when I use backticks, the system
>>>command, and/or the open command with a pipe. Would anyone please
>>>help me out?
>>>
>>>Here's what I'm using...
>>>
>>>OS: Red Hat Linux 8.0 (Psyche)
>>>Perl: v5.8.0 i386-linux-thread-multi
>>>Apache: 1.3.27
>>>
>>>Thanks,
>>>-Jeff
>>
>>Some code would be helpful. Also, check your error log to see if
>>anything useful is in there.
Sounds like possibly a mod_perl issue with a conflict with other
modules, since mod_perl & Mason allow that. Suggest looking through
mod_perl docs/newsgroups. There's also an HTML::Mason list and
eventhough it's not an issue with Mason, possibly someone in the
mod_perl or Mason list has had this issue.
Oh and make sure you have
PerlFreshRestart Off #not On
BTW: The Seg. fault may happen when the server is restarted.
See ya
------------------------------
Date: Mon, 07 Jul 2003 14:18:15 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: How can I analyse jpg file with perl?
Message-Id: <HifOa.19462$C43.9254@nwrddc04.gnilink.net>
George Kinley wrote:
> size of image in large as compared to jpeg, So the text you have
> written inside the jpeg file is actually a pixel , you just cannot
> get any text out of it, because there is NO TEXT there,
Well, yes, you can. That's what OCR is for. Of course that is a totally
different ballgame and considering the complexity of OCR Perl may not be a
good choice to implement an OCR program. After all, it is a whole academic
research area is dedicated to OCR.
And of course it is lightyears more difficult then the OP thought.
jue
------------------------------
Date: Mon, 07 Jul 2003 17:44:57 GMT
From: dkoleary@attbi.com
Subject: How differ these lwp queries?
Message-Id: <rkiOa.7157$PI5.5240@news.randori.com>
Hey;
I've been running through the Perl & LWP OReilly book, generally
with quite a bit of success. At the moment, I'm trying to automate
a job query against monster.com. I've verified that I can read in the
Netscape cookie file correctly by displaying my monster home page
w/o issues.
The specific job query is:
http://jobsearch.monster.com/jobsearch.asp?brd=1,1862,1863&lid=316&fn=\
&jt=1&jt=2&jt=3&jt=4&q=UNIX&tm=&cy=US&sq=&col=dltci
If I copy the url into a browser window, it works as I expect.
When I execute the $browser->post command as follows:
my $response = $browser->post(
'http://jobsearch.monster.com/jobsearch.asp',
[ "brd" => "1,1862,1863",
"lid" => "316",
"fn" => "",
"jt" => "1",
"jt" => "2",
"jt" => "3",
"jt" => "4",
"q" => "UNIX",
"tm" => "",
"cy" => "US",
"sq" => "",
"col" => "dltci"
]);
I get *some* other search; looks like a listing of all the jobs on monster.
Yet, when I execute the $browser->post command as follows:
my $response = $browser->post(
'http://jobsearch.monster.com/jobsearch.asp?brd=1,1862,1863&lid=316\
&fn=&jt=1&jt=2&jt=3&jt=4&q=UNIX&tm=&cy=US&sq=&col=dltci');
it works the way it does if I type it into the web client.
As long as it works, I'll be happy; it'd be a lot easier to read/maintain
if it worked w/the anonymous hash, but at least it works.
BTW, I broke the url lines above for readability/posting. In the script,
they're all one happy line where they're supposed to be.
Any ideas on why these queries seemingly work differently would be greatly
appreciated.
Doug O'Leary
--------
Senior UNIX Admin
O'Leary Computer Enterprises
dkoleary@attbi.com (w) 630-904-6098 (h) 630-248-2749
resume: http://home.attbi.com/~dkoleary/resume.html
------------------------------
Date: 07 Jul 2003 17:32:55 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: How do I clone a structure?
Message-Id: <u9llva47rc.fsf@wcl-l.bham.ac.uk>
tadmc@augustmail.com (Tad McClellan) writes:
> John Brock <jbrock@panix.com> wrote:
>
> > Is there a general way to clone the entire
> > data structure
>
>
> Your Question is Asked Frequently:
>
> How do I print out or copy a recursive data structure?
Is it just me, or does the word order above seem strange?
Surely is should read:
"How do I recursively print out or copy a data structure?"
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Mon, 07 Jul 2003 16:55:04 -0000
From: gbacon@hiwaay.net (Greg Bacon)
Subject: Re: How do I clone a structure?
Message-Id: <vgj9f8e0d1708e@corp.supernews.com>
In article <u9llva47rc.fsf@wcl-l.bham.ac.uk>,
Brian McCauley <nobull@mail.com> wrote:
: tadmc@augustmail.com (Tad McClellan) writes:
:
: > Your Question is Asked Frequently:
: >
: > How do I print out or copy a recursive data structure?
:
: Is it just me, or does the word order above seem strange?
:
: Surely is should read:
:
: "How do I recursively print out or copy a data structure?"
The questions aren't equivalent, but the difference is subtle. Who
cares how (e.g., recursively or iteratively) you print the data?
Mark me down in the "just you" column. :-)
Greg
--
When man attempts to rise above Nature, he usually falls below it.
-- Sherlock Holmes
------------------------------
Date: 7 Jul 2003 17:27:16 GMT
From: Tina Mueller <usenet@expires082003.tinita.de>
Subject: Re: How to secure Perl scripts from spammers?
Message-Id: <becahj$3h0pe$1@ID-24002.news.dfncis.de>
rbaker3@cox.net wrote:
> Recently I've had some spammers take advantage of some scripts on my
> web server that use sendmail. I'm not sure which script or scripts
> they are using, but my ISP has received complaints and has shut down
> Sendmail until I secure things.
> What can I do?
call sendmail with "-oi", call perl with -wT,
and read
perldoc perlsec
for info about -T and more
hth, tina
--
http://www.tinita.de/ \ enter__| |__the___ _ _ ___
http://Movies.tinita.de/ \ / _` / _ \/ _ \ '_(_-< of
http://www.perlquotes.de/ \ \ _,_\ __/\ __/_| /__/ perception
- my mail address expires end of august 2003 -
------------------------------
Date: Mon, 07 Jul 2003 17:56:45 GMT
From: Greg Schmidt <gregs@trawna.com>
Subject: Re: How to secure Perl scripts from spammers?
Message-Id: <s2cjgvoha7iu3lqeaggalnb02s2atteo97@4ax.com>
On 6 Jul 2003 22:49:46 -0700, rbaker3@cox.net (rbaker3@cox.net) wrote:
>Recently I've had some spammers take advantage of some scripts on my
>web server that use sendmail. I'm not sure which script or scripts
>they are using, but my ISP has received complaints and has shut down
>Sendmail until I secure things. What can I do? Some guy tells me he
>can add some code to some scripts to secure them for a charge of
>$65/hr.
My understanding is that most such problems arise when you have a script
that accepts an email address as a form parameter (usually hidden, but
it's there anyway). I say "most" because it's quite possible there are
other problems.
If you only have one address that you're sending mail to, it may be easy
to fix: just hardcode the address into the script instead of reading it
from the form. In the case of multiple addresses on the same domain,
you could get the username from the form (but carefully checked for
typical hacker tricks) and then append the domain name.
More general solutions include things like defining (in the script) a
list of valid email addresses to send to and rejecting anything not in
that list. These more general solutions are of course more
time-consuming and technically challenging, and I'm sure there are lots
of people here who would charge in the neighbourhood of $65/hr to do it.
Before you get too far into things, I'd do some web searches for the
various scripts you are using plus the word "security" and see what
turns up. It may well be that the scripts have well-documented problems
(which might come with either solutions, or recommendations to change to
a better alternate). Chances are very good you're not the only one to
run into this.
>I don't really want to have to pay him if I don't have to and
>I don't know how long it will take him and if he will actually secure
>them.
All valid concerns. Please don't be expecting people here to do the
same work for free, though. Advice is free, work costs!
>He mentioned something about using securemail.pl(whatever that
>is) and untainting.
I'm not familiar with securemail.pl but untainting is definitely
something you want to do with all data submitted to your scripts.
>I really don't want to
>have to rename scripts and move them to different dirs, because I
>would have to change the HTML code on a "lot" of pages referencing the
>scripts.
Renaming or moving your scripts might be a very temporary measure. If
you are being specifically targetted (rather than just being caught by
people looking for well-known script holes on random servers) (and I
have no reason in this case to believe one or the other is more likely),
then they will just look at your modified pages and find the new place
to attack.
--
Greg Schmidt (gregs@trawna.com)
Trawna Publications (http://www.trawna.com/)
------------------------------
Date: 7 Jul 2003 09:21:40 -0700
From: vanselow@hotmail.com (vanselow)
Subject: looking for low-cost programmer via internet
Message-Id: <9dd397d6.0307070821.30d61ab3@posting.google.com>
Hi,
I'm looking for an experienced low-cost perl-programer,
which could develope code over internet on some www-services.
The programmer should also know, how to work with databases (postgresql, mysql).
The cooperation - in case of success - should be for long term.
thank you
m. vanselow
------------------------------
Date: 7 Jul 2003 06:49:37 -0700
From: cprice@hrdenterprises.com (Chris)
Subject: LWP, cookies, and adding to request string
Message-Id: <a1a26a5.0307070549.18596f1e@posting.google.com>
Hello all,
I happened upon this group while searching around for
information on this topic. Here's the situation:
I've written a QA test tool for two sites that uses
LWP and Cookies in Perl. On the first site, I used
cookie_jar and everything worked just fine as far as
sessions went. On the second site, however, once a
user logs in, a unqique session variable (session=) is
being passed around in the URL wherever you go in the
members area.
Is there a way to deal with this using LWP and
cookie_jar? Another bit of information that may be
useful: the login form is submitted via Javascript -
I'm posting to the "resulting" members page via LWP,
but there could possibly be a middle layer page that
sets the session variable in the request string.
i.e. Login Page->Js function->(some page I need to
track down)->resulting members page
In any case, thoughts and suggestions would be greatly
appreciated.
Regards,
Chris
------------------------------
Date: 7 Jul 2003 09:29:46 -0700
From: rook_5150@yahoo.com (Bryan Castillo)
Subject: my first japh
Message-Id: <1bff1830.0307070829.704ed3bf@posting.google.com>
Here is my first attempt at a JAPH. Any pointers on how to shorten
it up more and obscure it?
$|++;print"\033[2J";$f="\033[5;%dH%s";$x=33;END{print"\n\n"}
@_=map{[--$x,$_]}split//,'rekcaH lreP rehtonA tsuJ';
select'','','',(printf$f,@{splice@_,rand@_,1})/10 while(@_);
------------------------------
Date: Mon, 7 Jul 2003 12:58:24 -0400
From: "LaDainian Tomlinson" <go@away.spam>
Subject: Re: my first japh
Message-Id: <CAhOa.14885$1a6.4675@lakeread01>
"Bryan Castillo" wrote:
> Here is my first attempt at a JAPH. Any pointers on how to shorten
> it up more and obscure it?
>
> $|++;print"\033[2J";$f="\033[5;%dH%s";$x=33;END{print"\n\n"}
> @_=map{[--$x,$_]}split//,'rekcaH lreP rehtonA tsuJ';
> select'','','',(printf$f,@{splice@_,rand@_,1})/10 while(@_);
I actually wrote my first a few days ago too (in my signature). Can't offer
any advice on obscuring yours, but you may consider only using double quotes
so that the whole command is executable from a command line using single
quotes (i.e., perl -e '<code>'). Other than that, I like it. Made me look
up select()...
Brandan L.
--
perl -we 'BEGIN{$SIG{__WARN__}=sub{print $1 if shift=~m!::(.+?)"!;}}
sub hacker{q: :.ucfirst(substr `perl -v`,9,4)." $::_.\n";}
$|=$,=pack"c",32;$_=shift;$\=eval;print $Just, "another";' hacker
------------------------------
Date: Mon, 7 Jul 2003 15:31:44 +0000 (UTC)
From: Perusion hostmaster <nanae@perusion.com>
Subject: Re: naming hash using a variable name.
Message-Id: <slrnbgj4j3.ota.nanae@ns.valuemedia.com>
On Mon, 07 Jul 2003 07:35:01 GMT, Uri Guttman <uri@stemsystems.com> wrote:
>>>>>> "Ph" == Perusion hostmaster <nanae@perusion.com> writes:
>
>
> Ph> I have used it where appropriate. In general with the type of
> Ph> simple data that my rather pedestrian application uses, it is not
> Ph> needed. AFAIK, explicit instantiation is not a performance
> Ph> penalty, and it helps the code better document itself.
>
> but it gets noisy. and i can (but won't) show you cases where it gets
> very annoying. and with multiple levels being accessed in one expression
> it becomes massively annoying.
As I said, I have used it where appropriate. I don't have a lot of
data structures with dynamic multi-level members, though.
WRT the noisy, it is not for me, because it ends up documenting
the data structure for other people working on the code. My project
has any number of people working on code I originally wrote, and
this style helps people know what is going on. I often prefer clarity
over economy of code lines for that reason.
> having done that very thing in perl4
> where i had to write all the create and access code for a massive and
> deep structure, i appreciate autoviv a great deal. now it can bite you
> in subtle ways but they are much less a problem than not having it at
> all.
I said "use strict qw/no_autovivify/;", not "remove it from the
source". 8-)
> note that perl6 will still have it but exists will not do it which
> is a good thing.
That has certainly bitten me before...I end up having to do
if($hash and exists $hash->{$member}) {
## Item is configured
}
--
Perusion Hostmaster
"Being against torture ought to be sort of a bipartisan thing."
-- Karl Lehenbauer
------------------------------
Date: Mon, 07 Jul 2003 18:06:27 +0000
From: Garry Short <g4rry_short@zw4llet.com>
Subject: Re: naming hash using a variable name.
Message-Id: <bec9fl$lpu$1$830fa17d@news.demon.co.uk>
Uri Guttman wrote:
> and you can even talk lower level that your code. you have to write code
> to some level of skill and not below that. i prefer to use hash slices
> as they are not complex, obscure and are teachable. look at my paper on
> them at
>
> http://www.sysarch.com/perl/tutorials/hash-slices.txt
>
>
Hi Uri,
Wow, I like that! It'll probably take a little while before it sinks into my
"code-production understanding", but it looks like fun!
One thing, though - can you just confirm that:
@foo_list = qw( a b c d ) ;
@bar_list = qw( j k l m n o ) ;
@baz_list = qw( w x ) ;
@expand_aliases{ @foo_list } = ( [ @foo_list ] ) x @foo_list ;
@expand_aliases{ @bar_list } = ( [ @bar_list ] ) x @bar_list ;
@expand_aliases{ @baz_list } = ( [ @baz_list ] ) x @baz_list ;
would produce:
%expand_aliases = (
'a' => ['a', 'b', 'c', 'd'],
...
'd' => ['a', 'b', 'c', 'd'],
'j' => ['j', 'k', 'l', 'm', 'n', 'o'],
...
'o' => ['j', 'k', 'l', 'm', 'n', 'o'],
'w' => ['w', 'x'],
'x' => ['w', 'x']
);
Is that right, or am I missing something?
Also, what does :
@aliases = @{ $expand_aliases{ $alias } } ;
do?
I'm assuming that:
@aliases = @{ $expand_aliases{ o } };
would give the same results as:
@aliases = qw(j k l m n o);
Is that right?
TIA,
Garry
------------------------------
Date: 7 Jul 2003 06:58:42 -0700
From: ashaman@creative-dark.de (Thomas Becker)
Subject: Naming some arrays in a foreach loop?!
Message-Id: <66b20d2c.0307070558.7f0a8291@posting.google.com>
Hey guys,
I've to read out some rows of some mysql db. No problem at all.
But I've to seperate the results for different machines.
So I tried the following:
while (@data = $sth->fetchrow_array()){
push @$i_date, $data[0];
push @$i_totalmem, $data[1];
push @$i_residentmem, $data[2];
push @$i_sharedmem, $data[3];
push @$i_privatemem, $data[4];
push @$i_cpu, $data[5];
push @$i_connections, $data[6];
}
Surely it does not work. :( How can I give the arrays names containing
$i?
And then I want to create some Graphs using GD:Graph (nice module).
How can I access every of the arrays created above seperately?
Again I tried something stupid:
foreach $i (@welo){
$my_graph->set_legend("$i_totalmem","$i_residentmem","$i_sharedmem","$i_privatemem","$i_cpu","$i_connections");
$gd = $my_graph->plot([\@$i_date, \@$i_totalmem,
\@$i_residentmem, \@$i_sharedmem, \@$i_privatemem, \@$i_cpu,
\@$i_connections])
or die $my_graph->error;
}
Surely it doesn't work at all. :)
Can someone give me a clue? I do not get this done by myself. I've got
no clue.
Thx ALOT, Thomas
------------------------------
Date: Mon, 07 Jul 2003 14:55:14 -0000
From: gbacon@hiwaay.net (Greg Bacon)
Subject: Re: Naming some arrays in a foreach loop?!
Message-Id: <vgj2ei4pcvi550@corp.supernews.com>
In article <66b20d2c.0307070558.7f0a8291@posting.google.com>,
Thomas Becker <ashaman@creative-dark.de> wrote:
: [...]
: So I tried the following:
:
: while (@data = $sth->fetchrow_array()){
: push @$i_date, $data[0];
: [...]
: }
:
: Surely it does not work. :( How can I give the arrays names containing
: $i?
The feature you're after is called a symbolic reference in Perl,
and you'd write that push as
push @{$i . "_date"}, $data[0];
However, YOU DON'T WANT TO DO THAT!!!
See "Why it's stupid to `use a variable as a variable name'" at
http://perl.plover.com/varvarname.html
and also the following resources:
http://perl.plover.com/varvarname2.html
http://perl.plover.com/varvarname3.html
: [...]
Greg
--
You have to choose between trusting the natural stability of gold and the
honesty and intelligence of members of the government. With due respect for
these gentlemen, I advise you, as long as the capitalist system lasts, to
vote for gold. -- George Bernard Shaw
------------------------------
Date: 7 Jul 2003 08:25:07 -0700
From: Xu.Yang@aspect.com (Xu Yang)
Subject: oneliner failed on Win2k with space in path name
Message-Id: <c395fcd9.0307070725.3b4de8e0@posting.google.com>
Hi,
I have an oneliner Perl script (see below) works fine when the path
name is 8.3 format on Win2K, but failed after it operated on a path
name contains space:
c:\perl -e "while(<>) {if(/^define/){print $ARGV.#'.$_;}}" c:\usr\*.tt
If I change the "c:\usr" to "c:\program files", it failed with error:
Can't open c:\program files\*.tt.
I double quote the path, did not help either.
Is this because the old version (5.x) of perl I am using?
Xu
------------------------------
Date: Mon, 07 Jul 2003 17:59:36 GMT
From: Greg Schmidt <gregs@trawna.com>
Subject: Re: oneliner failed on Win2k with space in path name
Message-Id: <e3djgvop62co7aqhbe6f6h823i5jj7tknm@4ax.com>
On 7 Jul 2003 08:25:07 -0700, Xu.Yang@aspect.com (Xu Yang) wrote:
>Hi,
>
>I have an oneliner Perl script (see below) works fine when the path
>name is 8.3 format on Win2K, but failed after it operated on a path
>name contains space:
>
>c:\perl -e "while(<>) {if(/^define/){print $ARGV.#'.$_;}}" c:\usr\*.tt
>
>If I change the "c:\usr" to "c:\program files", it failed with error:
>Can't open c:\program files\*.tt.
>I double quote the path, did not help either.
>
>Is this because the old version (5.x) of perl I am using?
No idea if that's the source of your problems, as I have never used any
Perl on Windows. A quick workaround would be to use the short version
of the long path, such as C:\progra~1\*.tt Use "dir /x" to show short
names at the command line.
--
Greg Schmidt (gregs@trawna.com)
Trawna Publications (http://www.trawna.com/)
------------------------------
Date: Mon, 7 Jul 2003 15:07:31 +0100
From: "Richard S Beckett" <spikey-wan@bigfoot.com>
Subject: Problem installing Win32::SerialPort
Message-Id: <bebutc$oig$1@newshost.mot.com>
Hello World! :-)
I get this error when trying to install Win32::SerialPort from the active
state suppository. I checked their website, and it said that it works with
perl 5.6...
D:\Perl\lib>ppm install Win32::SerialPort
Installing package 'Win32-SerialPort'...
Error installing package 'Win32-SerialPort': Read a PPD for
'Win32-SerialPort', but it is not intended for this build of Perl
(MSWin32-x86-multi-thread)
D:\Perl\lib>perl -v
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2001, Larry Wall
Binary build 632 provided by ActiveState Corp. http://www.ActiveState.com
Built 03:40:44 Jun 3 2002
...
What do I need to do to be able to install this module?
Thanks.
R.
------------------------------
Date: 7 Jul 2003 09:34:00 -0700
From: himal5@hotmail.com (Himal)
Subject: Question about Devel::Cover
Message-Id: <365e1935.0307070834.16c21694@posting.google.com>
Hi,
I am trying to do covegage on perl (5.8.0)
And have installed Devel::Cover 2.0 from Cpan. But when I try
perl -Mdevel::Cover temp.pl I get :
"Can't locate loadable object for module Devel::Cover in @INC"
and
"Devel::Cover: Can't find file "../../lib/DynaLoader.pm"
"Can't locate auto/Devel/Cover/set_criteri.al in @INC"
I am not sure how to go further.
Any help will be great.
Regars,
Himal.
------------------------------
Date: 7 Jul 2003 16:48:08 GMT
From: Tina Mueller <usenet@expires082003.tinita.de>
Subject: Re: Question about Devel::Cover
Message-Id: <bec888$3gga8$1@ID-24002.news.dfncis.de>
Himal wrote:
> I am trying to do covegage on perl (5.8.0)
> And have installed Devel::Cover 2.0 from Cpan. But when I try
> perl -Mdevel::Cover temp.pl I get :
> "Can't locate loadable object for module Devel::Cover in @INC"
how did you install it?
were there any error-messages during the make or make test?
hth, tina
--
http://www.tinita.de/ \ enter__| |__the___ _ _ ___
http://Movies.tinita.de/ \ / _` / _ \/ _ \ '_(_-< of
http://www.perlquotes.de/ \ \ _,_\ __/\ __/_| /__/ perception
- my mail address expires end of august 2003 -
------------------------------
Date: 07 Jul 2003 17:42:08 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: reading header? results from another script
Message-Id: <u9he5y47bz.fsf@wcl-l.bham.ac.uk>
tadmc@augustmail.com (Tad McClellan) writes:
> > }else{
>
>
> perlstyle.pod suggests you avoid such "cuddled" elses.
But it only suggests it very weakly.
I, personally, like to cuddle my elses.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 7 Jul 2003 07:39:10 -0700
From: rook_5150@yahoo.com (Bryan Castillo)
Subject: Re: Reading JPEG file
Message-Id: <1bff1830.0307070639.7a6a4b41@posting.google.com>
Zvone Zagar <zvone.zagar@siol.net> wrote in message news:<1a8Oa.55$2B6.10574@news.siol.net>...
> A. Sinan Unur wrote:
>
> > Zvone Zagar <zvone.zagar@siol.net> wrote in
> > news:7HGNa.22$2B6.2874@news.siol.net:
> >
> >> A. Sinan Unur wrote:
> >>
> >>> Zvone Zagar <zvone.zagar@siol.net> wrote in news:iafNa.2024$78.139057
> >>> @news.siol.net:
> >>>
> >>>> A. Sinan Unur wrote:
> >>>>
> >>>>> Zvone Zagar <zvone.zagar@siol.net> wrote in
> >>>>> news:GdKLa.1908$78.104444@news.siol.net:
> >>>>>
> >>>>>> I would like to read a jpg image, get data (decode) out of it and
> >>>>>> make a postscript file from scratch. I can get width, height,
> >>>>>> color depth but I don't know how to make a hex string needed for
> >>>>>> postscript. Postscript line should look like: width height depth
> >>>>>> matrix {<hex data>} false 3 colorimage.
> ...
> >>>>> ImageMagick can save image data in raw RGB format. Although I have
> >>>>> never used it, and do not have it installed, I thought pointing
> >>>>> that out might help.
> >>>>>
> >>>>> Sinan.
> >>>> I appologize for my late answer.
> >>>> The raw RGB format is unfortunately not the proper one.
> >>>> At first my lips smiled, but code generated is not PS digested.
> >>>> I will dig deeper.
> >>>
> >>> If I understand correctly, you need to get to the raw RGB data
> >>> somehow (I have no idea how one embeds jpegs in postscript), and then
> >>> insert those data in the document as ascii hexadecimal numbers. Is
> >>> that the case? If so, once you get the raw RGB data, you can easily
> >>> get what you want. So, raw RGB would not be the solution to your
> >>> problem, but the first step in a solution.
> >
> > <snip>
> >
> >> I really appreciate your effort. I set up temporary site at
> >> http:/freeweb.siol.net/an511zvo where some examples will clarify my
> >> intentions (I hope).
> >
> > It does. And thank you for posting a link rather than the actual files.
> >
> >> The Tk script creates a ps file. That is what I
> >> want to make, but not using Tk. I would like to make text (console)
> >> application which creates postscript file. File (I stripped off
> >> unnecessary ps code) raptor2.ps is what I want to get at. The hex code
> >> between curly braces and <> is the hex string which makes me perplexed.
> >> I think that raw RGB data is the first step, too.
> >
> > OK, so you are trying to do what I thought you were trying to do. Go ahead
> > and:
> >
> > 1. Decode the JPEG image into raw RGB format using ImageMagick
> >
> > 2. Print the value of each octet in the raw RGB data in hex, 66 characters
> > per line
> >
> > 3. For the second part, printf and/or sprintf are your friends.
> >
> > This should not take a lot of code. If you run into problems, post your
> > code here.
Sounds like a pretty cool script. Even if it works, I would
like to see it and read it.
> >
> >> p.s. My appreciation was not empty words
> >
> > Never thought it was. You are welcome.
> >
> > Sinan.
> Thanks
>
> Zvone
------------------------------
Date: 7 Jul 2003 10:47:21 -0700
From: jan_buys@hotmail.com (Jan)
Subject: references => how not to destroy my data ?
Message-Id: <11971c2c.0307070947.5c9a199@posting.google.com>
Hi,
I'm struggling with references again. Underneath you will find a code
snippet with some comments interleaved to tell what's going on.
# start code snippet.
$recordIndex = 0;
open (GROUPS, "<groupsfile.txt") or die "Cannot open $groupsFile\n";
while ($line = <GROUPS>)
{
@juniorMembers = ();
@seniorMembers = ();
#
# Snipped away code in which the two preceding arrays are populated
and in which
# which $group gets a valid value. This code was tested and correct.
So for
# keeping things easy I'll leave this 'huge' part out...
#
foreach $juniorMember(@juniorMembers)
{ push( @{$juniorArray}, $juniorMember) ; }
foreach $seniorMember(@seniorMembers)
{ push( @{$seniorArray}, $seniorMember) ; }
# Since I'm in while loop I try to store my data into an anonymous
# array by using a hard reference (e.g. $juniorArray)
$myrecord = { GROUP => $group,
JUNIOR => $juniorArray,
SENIOR => $seniorArray };
$database[$recordIndex++] = $myrecord;
}
# End code snippet.
Next thing I know, for each record I have in my 'database' array, when
dereferencing the arrays, about the same array contents. I do know
that I do overwrite my references to the arrays, but hoped that would
have been solved by storing these references in the anonymous hash.
dumb, dumber...
So perl doesn't know the location of my 'junior' and 'senior' arrays
data anymore, I guess. Can someone offer some advice on more proper
ways to come out of this while loop with the array data still intact ?
Hoping I stated the problem correctly,
Jan
------------------------------
Date: Mon, 07 Jul 2003 18:19:19 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: references => how not to destroy my data ?
Message-Id: <c4275c840a29166b587da3acfe43b71a@free.teranews.com>
>>>>> "Jan" == Jan <jan_buys@hotmail.com> writes:
Jan> I'm struggling with references again. Underneath you will find a code
Jan> snippet with some comments interleaved to tell what's going on.
You need to read my column on that subject:
<http://www.stonehenge.com/merlyn/UnixReview/col30.html>
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
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.
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 5189
***************************************