[23164] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5385 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 18 14:06:38 2003

Date: Mon, 18 Aug 2003 11:05:13 -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, 18 Aug 2003     Volume: 10 Number: 5385

Today's topics:
    Re: Accessing an F key <simon@unisolve.com.au>
    Re: Accessing an F key <peter@semantico.com>
    Re: and why can't I do my own CGI? <syscjm@gwu.edu>
    Re: can I still post here? <jurgenex@hotmail.com>
    Re: comp.lang.perl.zombie rfc in alt.config <peter@semantico.com>
        excel to csv <josh@nospam.pixael.com>
    Re: excel to csv <glex_nospam@qwest.net>
    Re: excel to csv <josh@nospam.pixael.com>
        GetTextExtent (get RTF string's width/height) function  <russ.johnson@earthlink.net>
    Re: how to rename 200 files in many sub-directories? <geoff.cox@blueyonder.co.uk>
    Re: Hudson River <noreply@gunnar.cc>
    Re: Hudson River <gellyfish@gellyfish.com>
    Re: Hudson River <noreply@gunnar.cc>
    Re: Hudson River <tim@vegeta.ath.cx>
        ignoring breakpoint in perl debugger (Zix)
    Re: ignoring breakpoint in perl debugger <nospam-abuse@ilyaz.org>
    Re: ignoring breakpoint in perl debugger (Peter Scott)
    Re: mod_perl 2 Setup ? <welton_bob@nospam_hotmail.com>
    Re: mod_perl 2 Setup ? <welton_bob@nospam_hotmail.com>
    Re: Module::Build is yet more broken... <nospam-abuse@ilyaz.org>
    Re: Module::Build is yet more broken... <nospam-abuse@ilyaz.org>
    Re: Order of evaluation of expressions nobull@mail.com
        Perl equiv to PHP file() ? <amittai@amittai.com>
    Re: Status counter (brice)
    Re: Strange problem with perl-oracle <r_reidy@comcast.net>
    Re: Testing whether a subroutine exists (symbolic ref) <usenet@expires082003.tinita.de>
    Re: Testing whether a subroutine exists (symbolic ref) nobull@mail.com
        Text extraction of multiple records (Bazuka)
    Re: Text extraction of multiple records <peter@semantico.com>
    Re: Text extraction of multiple records <noreply@gunnar.cc>
        XML to CSV Conversion (Ravi)
    Re: XML to CSV Conversion <bharn_S_ish@te_P_chnologi_A_st._M_com>
    Re:  <bwalton@rochester.rr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 19 Aug 2003 00:23:35 +1000
From: Simon Taylor <simon@unisolve.com.au>
Subject: Re: Accessing an F key
Message-Id: <3F40E167.4040000@unisolve.com.au>

Hello yoram,

>> Does someone know how can I access an F key using an html link,
>> javascript, form object.
>>
>> I need to open a full screen window (like pressing F11) after a link
>> or a button was pressed in the web page.
>>
>> Thanks
> 
> 
> Man walk into a butchers
> 
> Man:     "I would like a pair of size 9 shoes please"
> Butcher: "Sir, we are a butchers not a shoe shop"
> Man:     "Whats the difference, steaks and shoes come form the same animal"
> Butcher: "We are skilled in the art of butchery, you should seek a cobbler"
> Man:     "Look I've come here looking for shoes. Are you going to help me"
> Butcher: * Demonstrates the use of a cleaver *
> Man:     "Aaaargh......"
> Butcher: "Leave this establishment and darken our door no more"

Nahh, you can darken our door any time you like, (though the butcher 
shop/shoe shop analogy above is very apt), just as long as you come in 
looking for a perl-related thing. ;-)

I sense in your question that maybe there is something perl-related
we can help you with, but you'll need to help us a little more with
a more usefull description of your problem.

Also check out the posting guidelines at:

   http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

Regards,

Simon Taylor



> 




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

Date: Mon, 18 Aug 2003 15:01:19 +0100
From: Peter Hickman <peter@semantico.com>
Subject: Re: Accessing an F key
Message-Id: <3f40dc2f$0$10775$afc38c87@news.easynet.co.uk>

Simon Taylor wrote:
> Nahh, you can darken our door any time you like, (though the butcher 
> shop/shoe shop analogy above is very apt), just as long as you come in 
> looking for a perl-related thing. ;-)

I had visions of the apache configuration questions asked in perl groups (or 
was it the other way around) whereby the asker believes that the question 
should be answered in the group because Perl == CGI and CGI == Apache so since 
we are talking about Perl we should be able to answer a question on Apache 
configuration (or was it the other way around). Things go downhill from there. 
Hence the shoe / steak line.

Asking a Javascript question in a Perl newsgroup seems to indicate not enough 
though being applied. A quick browse of my news server seems to indicate 
around a dozen javascript newsgroups - although some are not in english 
(Italian, German, French, Japanese, Norwegen etc).

The other issue is that the search "f keys in javascript" on Google would seem 
to provide that answer with its first hit 
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20121433.html

"Use the Google Luke, use the Google" - Finding answer on the Internet 101.



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

Date: Mon, 18 Aug 2003 10:27:18 -0400
From: Chris Mattern <syscjm@gwu.edu>
Subject: Re: and why can't I do my own CGI?
Message-Id: <3F40E246.9050409@gwu.edu>

hudson wrote:
>>Nothing appears to be hard for you. So what do you want from this group?
>>If things are really that simple but you nonetheless consult the group
>>for help, perhaps they are still too tall an order for you.
>>
> 
> 
> bah....I just thought this was the "abuse me please" channel. anyway,
> as other people have mentioned before, this group does seem a bit
> dogmatic on certain topics
> 

They insist on code that works.  How narrow-minded, indeed.

                  Chris Mattern



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

Date: Mon, 18 Aug 2003 14:27:17 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: can I still post here?
Message-Id: <9n50b.7761$Bo6.5248@nwrddc03.gnilink.net>

hudson wrote:
> I like this newsgroup, even though I have heard lots of people have me
> on kill file now.
>
> Is it OK if I still post here?

You got a certain reputation now, no doubt about that.
But that's ok. If you are looking for comments and discussions about Perl
issues you have then go ahead and post them.

On small advice: you may want to have a look at
http://www.catb.org/~esr/faqs/smart-questions.html.
Although not really related to Perl it may explain a bit about what is going
on in technical newsgroups in general, about their sociology, and why you
have been bashed.

jue




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

Date: Mon, 18 Aug 2003 17:28:12 +0100
From: Peter Hickman <peter@semantico.com>
Subject: Re: comp.lang.perl.zombie rfc in alt.config
Message-Id: <3f40fe9c$0$10783$afc38c87@news.easynet.co.uk>

hudson wrote:
> for all you zombies...I want to create a special place for you to post
> your BS

hudson also wrote:
 > I am open to making amends...in fact, I emailed uri last night. It is
 > just 30 against 1 is bad odds for me and as soon as I try to settle
 > down, someone posts some inane thing to piss me off again.

Now would be a good time to claim that someone else is posting under your name 
to make you appear a complete twat. Or perhaps that Engligh is not your native 
language.

Leave the newsgroup alone for a week or two and then come back.



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

Date: Mon, 18 Aug 2003 15:55:43 +0200
From: "Josh" <josh@nospam.pixael.com>
Subject: excel to csv
Message-Id: <bhqlpl$261p1$1@ID-203386.news.uni-berlin.de>

hi all

anybody knows a script to save an excel in csv?

i need it for a php script

tnx




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

Date: Mon, 18 Aug 2003 10:58:46 -0500
From: "J. Gleixner" <glex_nospam@qwest.net>
Subject: Re: excel to csv
Message-Id: <mH60b.17$LC5.11341@news.uswest.net>

Josh wrote:
> hi all
> 
> anybody knows a script to save an excel in csv?
> 
> i need it for a php script
Then why ask in a perl newsgroup?  If you want a PHP answer, try a PHP 
newsgroup.




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

Date: Mon, 18 Aug 2003 19:29:55 +0200
From: "Josh" <josh@nospam.pixael.com>
Subject: Re: excel to csv
Message-Id: <bhr2b9$275ib$1@ID-203386.news.uni-berlin.de>

"J. Gleixner" <glex_nospam@qwest.net> ha scritto nel messaggio
news:mH60b.17$LC5.11341@news.uswest.net...
> Josh wrote:
> > hi all
> >
> > anybody knows a script to save an excel in csv?
> >
> > i need it for a php script
> Then why ask in a perl newsgroup?  If you want a PHP answer, try a PHP
> newsgroup.

i need a perl script to save an excel in csv




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

Date: Mon, 18 Aug 2003 16:57:37 GMT
From: "Russ Johnson" <russ.johnson@earthlink.net>
Subject: GetTextExtent (get RTF string's width/height) function in Win32 Perl?
Message-Id: <5A70b.181$kd3.53@newsread2.news.atl.earthlink.net>

Microsoft Visual C++ and Borland (Inprise) Delphi have GetTextExtent (and
similar functions) to determine the width and height of a string of RTF
text. How can I do this in Perl (for Win32)?

Thank you for any information you can provide.

 - Russ Johnson

   russ.johnson@earthlink.net

   Reinholds, PA




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

Date: Mon, 18 Aug 2003 14:38:49 +0100
From: Geoff Cox <geoff.cox@blueyonder.co.uk>
Subject: Re: how to rename 200 files in many sub-directories?
Message-Id: <qll1kvke5t0jkcsoddbs350haujo8i7p5f@4ax.com>

On Mon, 18 Aug 2003 10:25:57 GMT, "John W. Krahn" <krahnj@acm.org>
wrote:

John,

I wonder if you could just explain what is happening in the sub ..?

Geoff
>
>use warnings;
>use strict;
>
>use File::Find;
>use Archive::Zip;
>
>my $dir = 'c:/docs';
>
>find( sub {
>    ( my $name = $_ ) =~ s/\.zip$/.doc/i or return;
>    my $zip = Archive::Zip->new( $_ );
>    $zip->extractMember( ($zip->memberNames)[ 0 ], $name );
>    unlink $_ or warn "Cannot delete $_: $!";
>    }, $dir );
>
>__END__
>
>
>
>John



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

Date: Mon, 18 Aug 2003 18:03:07 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Hudson River
Message-Id: <bhqtd4$28mt8$1@ID-184292.news.uni-berlin.de>

Tintin wrote:
> I'm not arguing that you don't have the right to use whatever code
> you like in *your* program.  The problem occurs when someone either
> posts their bad code as a solution to someones problem/question or
> like our new troll, they claim they know it all and post their code
> as an example of their "excellence".

Then we are apparently not talking about the same thing. A comment on
the issue you are addressing:

Of course it's important that _answers_ or _model samples_, that are
posted here or in other similar forums, are not "bad". And if such
code occationally is bad, it will most certainly be followed up with
comments that call the readers' attention to that fact.

If your "Joe newbie" is so clueless so that he Googles to a random
piece of code, copies it and uses it without even reading the
accompaning comments, it's sad. But it would be a too big burden to
take responsibility for people that are so clueless, wouldn't it?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Mon, 18 Aug 2003 17:30:39 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Hudson River
Message-Id: <1061224239.62965.0@dyke.uk.clara.net>

Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> 
> If your "Joe newbie" is so clueless so that he Googles to a random
> piece of code, copies it and uses it without even reading the
> accompaning comments, it's sad. But it would be a too big burden to
> take responsibility for people that are so clueless, wouldn't it?
> 

But then when this person disovers that the code that they have 
copied from some random place on the web doesn't work they will
invariably turn up here or somewhere similar and a certain percent
of the time they will react badly to being told that downloading random
crap code is a bad thing to do.  So in the end we end getting to deal with it.

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: Mon, 18 Aug 2003 18:42:49 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Hudson River
Message-Id: <bhqvnj$29c4m$1@ID-184292.news.uni-berlin.de>

Jonathan Stowe wrote:
> Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
>> If your "Joe newbie" is so clueless so that he Googles to a
>> random piece of code, copies it and uses it without even reading
>> the accompaning comments, it's sad. But it would be a too big
>> burden to take responsibility for people that are so clueless,
>> wouldn't it?
> 
> But then when this person disovers that the code that they have 
> copied from some random place on the web doesn't work they will 
> invariably turn up here or somewhere similar and a certain percent 
> of the time they will react badly to being told that downloading
> random crap code is a bad thing to do.  So in the end we end
> getting to deal with it.

Maybe. And - what's your recipe? A global police force, covering www 
and Usenet, who removes every piece of "random crap code" that people 
post?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: 18 Aug 2003 09:47:10 -0700
From: Tim Hammerquist <tim@vegeta.ath.cx>
Subject: Re: Hudson River
Message-Id: <slrnbk20qe.m4.tim@vegeta.ath.cx>

Gunnar Hjalmarsson graced us by uttering:
> Of course it's important that _answers_ or _model samples_,
> that are posted here or in other similar forums, are not "bad".
> And if such code occationally is bad, it will most certainly be
> followed up with comments that call the readers' attention to
> that fact.

I agree.  This is largely true with only two considerations:

1)  When Josie User (hopefully) uses Google Groups to answer her
    questions before posting to the group, she may see this
    wonderful little script that Cory Coder posted and decide to
    use it, never bothering to click on the "Complete Thread"
    button and see how the next person pointed out how it would
    allow Sid "ph34r m3" Luser to read her private mail and make
    her dishes fly out of the cupboard to the tune of Helter
    Skelter.

2)  Often the person whose code is deemed "bad" refuses to accept
    this and keeps arguing their point using increasingly
    contrived contexts until theirs is the only possible answer,
    by which time half the group has killfiled them.

The latter does not seem to be avoidable, and is more a nuisance
than anything else.  The former rather more important, and the
only advice I can offer in this regard is, "When googling, please
read the entire thread!"

Tim Hammerquist
-- 
Two of the most famous products of Berkeley are LSD and Unix.
I don't think that this is a coincidence.
    -- Anonymous


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

Date: 18 Aug 2003 07:47:59 -0700
From: zix6@yahoo.com (Zix)
Subject: ignoring breakpoint in perl debugger
Message-Id: <3f1e5480.0308180647.2200b27@posting.google.com>

How can I ignore the next, lets say 100, instances of a breakpoint in
the perl debugger?  for those familiar with gdb, what I'm looking for
is the equivalent to: ignore 1 100, command.

Thanks,


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

Date: Mon, 18 Aug 2003 14:59:07 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: ignoring breakpoint in perl debugger
Message-Id: <bhqpjr$1hbb$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Zix
<zix6@yahoo.com>], who wrote in article <3f1e5480.0308180647.2200b27@posting.google.com>:
> How can I ignore the next, lets say 100, instances of a breakpoint in
> the perl debugger?  for those familiar with gdb, what I'm looking for
> is the equivalent to: ignore 1 100, command.

Programmatically.  `A'ctions have a possibility to control the
debugger - via the debugger API (which see).  Messy, of course.

Hope this helps,
Ilya





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

Date: Mon, 18 Aug 2003 16:06:31 GMT
From: peter@PSDT.com (Peter Scott)
Subject: Re: ignoring breakpoint in perl debugger
Message-Id: <bQ60b.769678$3C2.17614375@news3.calgary.shaw.ca>

In article <3f1e5480.0308180647.2200b27@posting.google.com>,
 zix6@yahoo.com (Zix) writes:
>How can I ignore the next, lets say 100, instances of a breakpoint in
>the perl debugger?  for those familiar with gdb, what I'm looking for
>is the equivalent to: ignore 1 100, command.

Make it a conditional breakpoint instead:

	DB<1> d 42
	DB<2> b 42 $count++ == 100

-- 
Peter Scott
http://www.perldebugged.com


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

Date: Mon, 18 Aug 2003 15:49:23 +0100
From: "Bob Welton" <welton_bob@nospam_hotmail.com>
Subject: Re: mod_perl 2 Setup ?
Message-Id: <bhqpa9$9of$1@news.freedom2surf.net>

Thanks Sam, I've sent you the  httpd.conf etc

"sam" <rbaba99@caramail.com> wrote in message
news:bhqeko$4od$1@news.cybercity.dk...
> I can't see the problem with the infos you give.
> I have the same configuration as you: redhat, apache2,...
> and all is fine.
>
> Try with adding "Allow from all" to the directory list of directives:
> <directory /var/www/perl>
> ....
> ....
> ....
> Allow from all
> </directory>
>
> Please send your httpd.conf file to help?
> Hide all the private infos (IPs and domain names)
> from your httpd.conf file before you send it :-)
>
>
>
>
>
> "Bob Welton" <welton_bob@nospam_hotmail.com> wrote in message
> news:bhq7ak$1ta$1@news.freedom2surf.net...
> > Thanks Sam,
> >
> > I have the following structure:
> >
> > /mysite.com/cgi-bin/index.pl            + a few other .pl's
> > /mysite.com/perl/directories/###.pm    + all my .pm's for the
application
> >
> > Currently I have the Directory and Alias pointing to /mysite.com/perl
> path
> > If I point it to the higher directory  /mysite.com   or  to
> > /mysite.com/cgi-bin  I get a Server Error 500 when trying to browse the
> web
> > site.
> >
> > I have setup the test index.pl, set the chmod permissions and pointed to
> it
> > in the Alias and Directory settings of  perl.conf. However when browsing
> it
> > I get the Server error ! Error 500 page returned.
> >
> > Reverting it index.pl to my  site version, however works ok.... but slow
> >
> > Any other suggestions ?
> >
> >
> > "sam" <rbaba99@caramail.com> wrote in message
> > news:bhosud$1fjj$1@news.cybercity.dk...
> > > > mmm can I clarify: Where should the 'Alias' and '<Directory' point
to
> ?
> > >
> > > It shoud point to the location where your scripts are.
> > > Your index.pl must be in this directory.
> > > Set the permission of this directory to 0777.
> > >
> > > > chmod 0777 /var/www/perl
> > >
> > > This is very very insecure and you should not follow this approach on
> the
> > > production machine. This is good enough when you just want to try
things
> > out
> > > and want to have as few obstacles as possible.
> > >
> > > Try first with and index.pl that contains this:
> > >
> > > #!/usr/bin/perl
> > > print "Content-type: text/plain\r\n\r\n";
> > > print "mod_perl rules!\n";
> > >
> > >
> > > >chmod 0755 /var/www/perl/index.pl
> > >
> > > and point your browser to : http://your_server/perl/index.pl
> > >
> > > Hope this helps.
> > >
> > >
> >
> >
>
>




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

Date: Mon, 18 Aug 2003 16:53:14 +0100
From: "Bob Welton" <welton_bob@nospam_hotmail.com>
Subject: Re: mod_perl 2 Setup ?
Message-Id: <bhqt3m$bh4$1@news.freedom2surf.net>

Yep have confirmed that both Perl and mod_perl are installed, its more a
matter of configuration I think.

My site is running the perl ok, just a bit slow.
When I browse the site, there is a 2.1 second delay following the SYN of the
initial connection to the point that the 1st byte of resultant HTML is
returned. This test takes out effect of connection speed etc and should
indicate the time to translate the perl code to HTML.

Many thanks

Bob

"pkent" <pkent77tea@yahoo.com.tea> wrote in message
news:pkent77tea-74BD3D.01013618082003@usenet.force9.net...
> In article <bhnaet$q4c$1@news.freedom2surf.net>,
>  "Bob Welton" <welton_bob@nospam_hotmail.com> wrote:
>
> > I am running Red Hat 9 that  has Apache 2 installed with the build. I
have
> > been trying to set up mod_perl 2 but have had lots of problems and don't
> > think its working. How can I check if its installed ?
> >
> > I have tried   # httpd -l  and get:
> > Compiled in modules:
> >   core.c
> >   prefork.c
> >   http_core.c
> >   mod_so.c
> >
> > Should mod_perl appear here in version 2 ?
>
> On my SuSE Linux system mod_perl was a separate package (i.e. an RPM)
> which I had to install separately from the mail apache install. Have a
> look in your system configuration tool (it's called YAST in SuSE linux,
> for example) and see if you can add a mod_perl package. I reckon that's
> the easiest thing to start with.
>
> Also you can try using the locate program and look for mod_perl.so -
> this is what I get on my machine:
>
> $ locate mod_perl.so
> /usr/local/apache2/modules/mod_perl.so
>
> That will at least tell you if the module is on the disk somewhere.
> Similarly try to 'locate Apache2/ModPerl'
>
> P
>
> --
> pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
> Remove the tea to reply




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

Date: Mon, 18 Aug 2003 13:37:31 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Module::Build is yet more broken...
Message-Id: <bhqkqr$1eaa$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Sam Holden
<sholden@cs.usyd.edu.au>], who wrote in article <slrnbk05g0.ah8.sholden@flexal.cs.usyd.edu.au>:
> > The beauty of Makefile.PL user interface (as opposed to the - faulty -
> > packager's interface) is that it was shell-, OS-, filesystem-,
> > etc-independent.  Now comes Build - and the invocation has the ./file
> > syntax, which is system-dependent!
> 
> Surely it could just say:
> 
> perl Build.PL
> perl Build test
> perl Build install

Why do you think so?  `perl Build' being different from `perl
Build.PL' - this depends on the (undocumented and quite probably
subject to change soon) order of executable extensions for the Perl
scripts.  Moreover, who guaranties that there is no F<Build> on the
PATH before '.'?

Ilya


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

Date: Mon, 18 Aug 2003 14:14:43 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Module::Build is yet more broken...
Message-Id: <bhqn0j$1fmh$1@agate.berkeley.edu>

[I move this from mail to news again]

On Sun, Aug 17, 2003 at 06:21:02PM -0700, Michael G Schwern wrote:
> On Sun, Aug 17, 2003 at 04:45:05PM -0700, Ilya Zakharevich wrote:
> > While I too consider MakeMaker a broken architecture, this Module::Build
> > idea is much more broken (not even speaking about the faulty logic in
> > the presentation cited above).
> 
> You write beautiful insults, Ilya.  I'd like to hear why you think the
> logic is faulty.

There are several points to make.  First of all, it makes me cry when
one makes all these arguments about all MakeMaker's problems being
fixable except the dependence on make, then quotes this ppm-section as
an example.  Yes, this section is an absolute mess.  However, if one
allows 10-line-long edit to MakeMaker, then this section would become

  ppm:
	perl -MExtUtils::MMTools -e write_ppm name=$(NAME) ...

Second, it is absolutely unclear from the presentation whether
Module::Build duplicates the functionality of make.

Third, if yes, then I see no point in all this discussion:
"effectively," Module::Build becomes a beautified MakeMaker - which in
addition to generating a Makefile, also writes ./make executable.

If no, then Module::Build becomes a toy-like tool without a
scalability potential.  Some of my modules take (or took) hours to
build.  If any change results in a complete rebuild, what happens to
the development cycle?  Moreover, some of my modules create/modify a
pletora of ancillary files with quite a lot of interdependencies.  If
I can't write an analogue of extra-targets section of Makefile, it
would delegate the responsibility of tracking all these timestamps to
me.  Thanks, no, thanks.

> > So now the README for a distribution should contain "If you are on
> > ..., ..., or ..., use the following commands to build this package; if
> > you are on ..., ..., use these commands; otherwise you are on your
> > own, since I do not know the shell syntax there".  Or if it does not,
> > it's the users who are delegated the responsibility to find this
> > out...

> Module::Build's own README explains...

>     Standard process for building & installing modules:
 ...
>     Or, if you're on a platform (like DOS or Windows) that doesn't like the "./"
>     notation, you can do this:

How would the user detect whether his "platform" (actually, the shell)
"doesn't like" something?  Moreover, if I write "See the
Module::Build's own README" in *my* README, 50% of the users will be
lost - where will they find it?

 ...
> which covers all the bases

No it does not (see my other reply).

> Compare to all the caveats for MakeMaker, illustrated by the length of
> perlmodinstall (which is itself not entirely complete).  Figuring out if you
> have a make variant.  Whether or not its compatible with MakeMaker.  Where
> to find one if you don't have make.  How to install it.  How to pass
> arguments to your particular make flavor.  What targets won't work on your
> platform...  

All this should have been done during the Perl installation.  If no
viable make is present, Nice::MakeMaker should have written ./make
substitute, and emit the message advicing the user on using ./make (or
whatever the local convention is) instead of make in the standard
recipes.  (Actually, my own alternative to ppm - available as a patch
to MakeMaker several years ago - would do exactly this: the generated
binary distribution had ./make$SCRIPT_EXTENSION which was a shell
(probably shellified Perl) script supporting the standard targets.)

> Make is not a ubiquitous, cross-platform tool.

With Perl, you can make it.

> > IMO, one should have abandon `make' and `make test'-like commands at
> > all, doing the `make; make test' step by default during the `perl
> > FirstStep.PL' phase.  If the finer control is needed, one should be
> > able to specify this by arguments on the FirstStep.PL line.  E.g., one
> > possible syntax for the standard invocation might have been
> > 
> >   perl FirstStep.PL do=config do=build do=test do=install
> > 
> > (with `do=config do=build do=test' being the default if no do= options
> > are given).  [Here FirstStep is just a placeholder, of course...]
> 
> This can still be done, if the Module::Build folks so desire, without
> breaking the existing system.  If "do" is given as an argument to Build.PL
> it will run those actions immediately.

IMO, the crucial part is defaulting to `do=config do=build do=test'
which is not backward-compatible.  Without this you get too much
error-prone typing - long commands could be show-stoppers for a lot of
users...

Hope this helps,
Ilya


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

Date: 18 Aug 2003 10:38:36 -0700
From: nobull@mail.com
Subject: Re: Order of evaluation of expressions
Message-Id: <4dafc536.0308180938.72123045@posting.google.com>

Rafael Garcia-Suarez <rgarciasuarez@free.fr> wrote in message news:<slrnbjvngc.3os.rgarciasuarez@dat.local>...
> Mark Jason Dominus wrote in comp.lang.perl.misc :
> > Is this:
> > 
> >         @s = qw(a b);
> >         $z = shift(@s) . shift(@s);
> >         print $z;
> > 
> > guaranteed to print "ab"?
> 
> I'm not sure what you're asking for.

Hmmm... look who's asking.

> Guarantee across all perl (5) versions ?
> Future, past or present ? Guaranteed by the "language spec" (whatever
> this may be) ?

I suspect that MJD is asking precisely to bring to the fore the fact
that the "language spec" (whatever that may be) currently doesn't
comment one way or the other.

Some people will interpret this has meaning it may change in future.

Other people will interpret this as meaning the "intuative" order is
guaranteed.

And, true to form, our resident troll will make nonsensical assertions
about how the intuative order is logically implied by presidence.

> Currently, due to the way the optree is constructed and executed, and
> due to the implementation of shift, I'd say that your snippet is
> guaranteed to produce "ab". But don't rely on it. I don't think Perl 5
> will ever show another behavior, but Ponie might, if the internal
> optimizer finds it more convenient to evaluate the right side of concat
> first.

I'd like to see the "language spec" (whatever that may be) make a
statement one way or the other.

Making it defined will reduce the scope for optomisations in Ponie.

Making it undefied will break a lot of existing code.

Not an easy choice.

Of course there are many more complex examples... see:
  Message-ID: <u965stkxuk.fsf@wcl-l.bham.ac.uk>
  http://groups.google.com/groups?selm=u965stkxuk.fsf%40wcl-l.bham.ac.uk


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

Date: Mon, 18 Aug 2003 13:05:37 -0400
From: "Amittai Aviram" <amittai@amittai.com>
Subject: Perl equiv to PHP file() ?
Message-Id: <bhr116$29jst$1@ID-124651.news.uni-berlin.de>

Does Perl have an equivalent to the PHP function file()?  file() reads a
file into an array.  More importantly for me, you can pass a URL to file(),
and it will read into the array the HTML output of that file as served
through HTTP:

$output = file(''http://www.mysite.com/test.pl'')

This will read the HTML output of the test.pl executable and put each line
of it into a successive element of the $output array.  (In PHP, $ designates
any variable, including an array -- it does not use @ or % to distinguish
variable types.)

It would be very helpful to me if I could find a Perl equivalent to PHP's
file(url).  Thanks!

Amittai Aviram






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

Date: 18 Aug 2003 09:15:07 -0700
From: bricemason@hotmail.com (brice)
Subject: Re: Status counter
Message-Id: <50404b7a.0308180815.330aafc4@posting.google.com>

Thank you everyone for your responses. Very helpful! I think I will
look at the Term::ProgressBar module.

Thanks Again,

brice

> 
> Take a look at Term::ProgressBar;
> 
>   my $bar = Term::ProgressBar->new({name => 'Processing...', count => 10});
>   for ( 1 .. 10 ) {
>       $bar->update();
>   }


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

Date: Mon, 18 Aug 2003 07:20:56 -0600
From: Ron Reidy <r_reidy@comcast.net>
Subject: Re: Strange problem with perl-oracle
Message-Id: <3F40D2B8.6000902@comcast.net>


[snip]

> You must install a Solaris patch to run this version of the Java runtime.
> Please see the README and release notes for more information.

Did you read the README file(s)?  Have you searched metalink (I think 
the problem is answered in both places)?

>  I think that the errors appears when the program try to connect at the DB

Why don't you know?  Have you used the bebugger and stepped through the 
code?

> 
> I have compared the 2 box but seams equals , objvius a difference are 
> present but i not know where find it
> 
> Can someone have some sudgestion about this probelm ?
> 
> Thanks for the support
> 
> Regards LAGO
> 


-- 
Ron Reidy
Oracle DBA



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

Date: 18 Aug 2003 13:56:54 GMT
From: Tina Mueller <usenet@expires082003.tinita.de>
Subject: Re: Testing whether a subroutine exists (symbolic ref)
Message-Id: <bhqlv6$25j9g$1@ID-24002.news.uni-berlin.de>

Arvin Portlock wrote:
> I simply want to test whether
> the named subroutine actually exists in the code.

print "$sub exists" if main->can( $sub );

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: 18 Aug 2003 10:08:39 -0700
From: nobull@mail.com
Subject: Re: Testing whether a subroutine exists (symbolic ref)
Message-Id: <4dafc536.0308180908.22dc4373@posting.google.com>

Arvin Portlock <apollock11@hotmail.com> wrote in message news:<bhoiv5$5gh$1@agate.berkeley.edu>...
> I'm having a look at some old code which uses symbolic subroutine
> references (I know, A Very Bad Thing). I simply want to test whether
> the named subroutine actually exists in the code.

It is worth pointing out that when you say "exists" everyone I've seen
contribute to this thread has (prossibly correctly) asummed you
probably mean "defined".

  sub this_exists_but_is_not_defined;

  sub this_is_defined { 1 }

To tell if a subroutine is defined you use defined().

To tell if a subroutine exists you use exists() - but only in recent
Perls.

Both exists(&$foo) and defined(&$foo) are exempt from strict refs
although this is not explicitly documented anywhere AFAIK.

Subroutines that exist but are not defined are often used in
conjunction with AUTOLOAD to declare prototypes for autoloaded
functions or to override an inherited method with an autoloaded one.


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

Date: 18 Aug 2003 07:41:19 -0700
From: yingyangbazuka@yahoo.com (Bazuka)
Subject: Text extraction of multiple records
Message-Id: <2fcba82d.0308180641.a741ad6@posting.google.com>

I am trying to extract some information out of a large text file that
contains multiple records, each of which looks like the following.

--------------------------------------------------------	
	DOCUMENT Id: 1234	

PUBNAME: xxx y zzz (8888888)	Bookstore: Some store name
AUTHOR: aaa b cccc (1111)	DOB:04/09/1964
DATE: 09/09/1999


Some comments follow here that must be extracted.....
-----------------------------------------------------------

I want to be able to extract all information like PUBNAME along with
its ID(8888888), author's name and id(1111), date, bookstore name PLUS
all the free-text comments that follow this list. I want to do this
for each of the records present in the file and write out the
extracted comments to a separate file with file name as
<PUBNAME_AUTHOR_DATE>.

IN my Perl script I can extract the Pubname and ID, but nothing else.
Is there an easy way to accomplish this in Perl or  shell scripts?

Any help would be appreciated!


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

Date: Mon, 18 Aug 2003 15:56:32 +0100
From: Peter Hickman <peter@semantico.com>
Subject: Re: Text extraction of multiple records
Message-Id: <3f40e920$0$12640$afc38c87@news.easynet.co.uk>

Bazuka wrote:
> I am trying to extract some information out of a large text file that
> contains multiple records, each of which looks like the following.
> 
> --------------------------------------------------------	
> 	DOCUMENT Id: 1234	
> 
> PUBNAME: xxx y zzz (8888888)	Bookstore: Some store name
> AUTHOR: aaa b cccc (1111)	DOB:04/09/1964
> DATE: 09/09/1999
> 
> 
> Some comments follow here that must be extracted.....
> -----------------------------------------------------------
> 
> I want to be able to extract all information like PUBNAME along with
> its ID(8888888), author's name and id(1111), date, bookstore name PLUS
> all the free-text comments that follow this list. I want to do this
> for each of the records present in the file and write out the
> extracted comments to a separate file with file name as
> <PUBNAME_AUTHOR_DATE>.
> 
> IN my Perl script I can extract the Pubname and ID, but nothing else.
> Is there an easy way to accomplish this in Perl or  shell scripts?
> 
> Any help would be appreciated!

Could you please post a snipet from your code that is parsing the record and 
we can see what you are doing and comment upon it.



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

Date: Mon, 18 Aug 2003 17:09:13 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Text extraction of multiple records
Message-Id: <bhqq80$22dio$1@ID-184292.news.uni-berlin.de>

Bazuka wrote:
> I am trying to extract some information out of a large text file
> that contains multiple records, ...

<snip>

> IN my Perl script I can extract the Pubname and ID, but nothing
> else.

Show us what you've got so far, and somebody will probably help you 
fix it.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: 18 Aug 2003 06:53:19 -0700
From: anamalay@hotmail.com (Ravi)
Subject: XML to CSV Conversion
Message-Id: <2c6dd813.0308180553.382c295b@posting.google.com>

Hi All,

Does anyone have a perl script handy to show me how to convert an XML
document to CSV format ?

Thanks in advance.


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

Date: Mon, 18 Aug 2003 15:48:44 GMT
From: Brian Harnish <bharn_S_ish@te_P_chnologi_A_st._M_com>
Subject: Re: XML to CSV Conversion
Message-Id: <pan.2003.08.18.15.49.04.387742@te_P_chnologi_A_st._M_com>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

On Mon, 18 Aug 2003 06:53:19 -0700, Ravi wrote:

> Hi All,
> 
> Does anyone have a perl script handy to show me how to convert an XML
> document to CSV format ?
> 
> Thanks in advance.

That is really not a trivial task as is. It may be easy or difficult
depending on your XML schema.

(Rhetorical question:)
For instance, how would you map this to csv?
<person id="12">
  <firstname>Brian</firstname>
  <lastname>Smith</lastname>
  <relationship type="father" id="1234"/>
  <relationship type="mother" id="12345"/>
  <relationship type="sister" id="12346"/>
  <relationship type="friend" id="12347"/>
  <relationship type="friend" id="12348"/>
  <relationship type="friend" id="12349"/>
  <relationship type="friend" id="123491"/>
  <relationship type="friend" id="123492/>
</person>


 - Brian
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/QPVXiK/rA3tCpFYRAr6TAKD1sZfKbgW9HrqOY86C5ADp4uDDZgCg5ile
qfn1li7flzdN5uVHl/o66z4=
=E1OE
-----END PGP SIGNATURE-----



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

Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: 
Message-Id: <3F18A600.3040306@rochester.rr.com>

Ron wrote:

> Tried this code get a server 500 error.
> 
> Anyone know what's wrong with it?
> 
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {

(---^


>     dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
 ...
> Ron

 ...
-- 
Bob Walton



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

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 5385
***************************************


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