[23077] in Perl-Users-Digest
Perl-Users Digest, Issue: 5298 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 31 11:10:33 2003
Date: Thu, 31 Jul 2003 08:10:09 -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 Thu, 31 Jul 2003 Volume: 10 Number: 5298
Today's topics:
Web development and Perl 6 <none@none.com>
Re: Web development and Perl 6 <abigail@abigail.nl>
Re: Web development and Perl 6 <none@none.com>
Re: Web development and Perl 6 <abigail@abigail.nl>
Re: Web development and Perl 6 <uri@stemsystems.com>
Re: Web development and Perl 6 <jurgenex@hotmail.com>
win32 - kill 0 and handle leaks. <hyagillot@tesco.net>
Re: Win32 Ole <bart.lateur@pandora.be>
Re: Win32 Ole <mikeflan@earthlink.net>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 31 Jul 2003 13:24:59 +0100
From: Garry Heaton <none@none.com>
Subject: Web development and Perl 6
Message-Id: <4Z7Wa.51130$9C6.2994987@wards.force9.net>
I'm web developer who's been usinng Perl/CGI.pm for a while before switching
to PHP.
IMHO if Perl 6 doesn't come with some kind of SDK for web developoment, ie.
at least a templating system, then it will become increasingly marginalised
in the web development world due to the proliferation of PHP within modestly
priced hosting deals.
It's not enough to say mod_perl/Embperl/Mason or whatever for the simple
reason that many new web developers and teachers use cheap hosting deals
which invariably come fully configured with PHP/MySQL and nothing more than
standard Perl/CGI.pm. These hosts won't consider running mod_perl or any
templatinng system. In fact I've come across many more expensive hosting
deals with similar constraints regarding Perl. mod_perl is too great a risk
for shared hosting environments.
Perl is in too many bits and pieces, at least where web development is
concerned. DBI, DBD::mysql, mod_perl, Mason/Embperl. That's a non-starter
with most hosting deals so you're average web developer turns to PHP which
usually comes fully optimised without the need for additional modules. I'm
talking about basic bread and butter database website work here, not LWP jobs.
Perl started out as a sysadmin tool but there's no reason to stay in that
niche now we have Perl 6 on the way. If we don't seize the chance to bundle
a proper web development SDK with Perl 6 PHP will just become the de facto
server-side scripting language for web development.
Garry Heaton
------------------------------
Date: 31 Jul 2003 13:20:20 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Web development and Perl 6
Message-Id: <slrnbii5sj.4g0.abigail@alexandra.abigail.nl>
Garry Heaton (none@none.com) wrote on MMMDCXXI September MCMXCIII in
<URL:news:4Z7Wa.51130$9C6.2994987@wards.force9.net>:
$$ I'm web developer who's been usinng Perl/CGI.pm for a while before switching
$$ to PHP.
$$
$$ IMHO if Perl 6 doesn't come with some kind of SDK for web developoment, ie.
$$ at least a templating system, then it will become increasingly marginalised
$$ in the web development world due to the proliferation of PHP within modestly
$$ priced hosting deals.
$$
$$ It's not enough to say mod_perl/Embperl/Mason or whatever for the simple
$$ reason that many new web developers and teachers use cheap hosting deals
$$ which invariably come fully configured with PHP/MySQL and nothing more than
$$ standard Perl/CGI.pm. These hosts won't consider running mod_perl or any
$$ templatinng system. In fact I've come across many more expensive hosting
$$ deals with similar constraints regarding Perl. mod_perl is too great a risk
$$ for shared hosting environments.
Oh, please. The future of Perl isn't decided by people who can't or won't
invest the money in their website that enables them to decide for themselves
which modules they have available.
$$ Perl is in too many bits and pieces, at least where web development is
$$ concerned. DBI, DBD::mysql, mod_perl, Mason/Embperl. That's a non-starter
$$ with most hosting deals so you're average web developer turns to PHP which
$$ usually comes fully optimised without the need for additional modules. I'm
$$ talking about basic bread and butter database website work here, not LWP job
$$
$$ Perl started out as a sysadmin tool but there's no reason to stay in that
$$ niche now we have Perl 6 on the way. If we don't seize the chance to bundle
$$ a proper web development SDK with Perl 6 PHP will just become the de facto
$$ server-side scripting language for web development.
I don't think that would happen. However, if that's a side effect of perl6,
I'd switch my opinion from "I don't think perl6 is worth the effort" to
"I want perl6 yesterday".
I rather have that people no longer think "Perl" when they have to do
anything webbish. Or that they think "Web" if they hear "Perl".
Abigail
--
$"=$,;*{;qq{@{[(A..Z)[qq[0020191411140003]=~m[..]g]]}}}=*_;
sub _ {push @_ => /::(.*)/s and goto &{ shift}}
sub shift {print shift; @_ and goto &{+shift}}
Hack ("Just", "Perl ", " ano", "er\n", "ther "); # 20030731
------------------------------
Date: Thu, 31 Jul 2003 14:47:15 +0100
From: Garry Heaton <none@none.com>
Subject: Re: Web development and Perl 6
Message-Id: <ca9Wa.51147$9C6.2995836@wards.force9.net>
Abigail wrote:
> Garry Heaton (none@none.com) wrote on MMMDCXXI September MCMXCIII in
> <URL:news:4Z7Wa.51130$9C6.2994987@wards.force9.net>:
> $$ I'm web developer who's been usinng Perl/CGI.pm for a while before switching
> $$ to PHP.
> $$
> $$ IMHO if Perl 6 doesn't come with some kind of SDK for web developoment, ie.
> $$ at least a templating system, then it will become increasingly marginalised
> $$ in the web development world due to the proliferation of PHP within modestly
> $$ priced hosting deals.
> $$
> $$ It's not enough to say mod_perl/Embperl/Mason or whatever for the simple
> $$ reason that many new web developers and teachers use cheap hosting deals
> $$ which invariably come fully configured with PHP/MySQL and nothing more than
> $$ standard Perl/CGI.pm. These hosts won't consider running mod_perl or any
> $$ templatinng system. In fact I've come across many more expensive hosting
> $$ deals with similar constraints regarding Perl. mod_perl is too great a risk
> $$ for shared hosting environments.
>
> Oh, please. The future of Perl isn't decided by people who can't or won't
> invest the money in their website that enables them to decide for themselves
> which modules they have available.
The future design of Perl may not be but it usage amongst new web developers
may well be. There is currently a truckload of PHP/MySQL web development
books available. I can only think of one, Paul Dubois, for Perl and MySQL.
You have to ask why this is, or don't you care?
>
> $$ Perl is in too many bits and pieces, at least where web development is
> $$ concerned. DBI, DBD::mysql, mod_perl, Mason/Embperl. That's a non-starter
> $$ with most hosting deals so you're average web developer turns to PHP which
> $$ usually comes fully optimised without the need for additional modules. I'm
> $$ talking about basic bread and butter database website work here, not LWP job
> $$
> $$ Perl started out as a sysadmin tool but there's no reason to stay in that
> $$ niche now we have Perl 6 on the way. If we don't seize the chance to bundle
> $$ a proper web development SDK with Perl 6 PHP will just become the de facto
> $$ server-side scripting language for web development.
>
> I don't think that would happen. However, if that's a side effect of perl6,
> I'd switch my opinion from "I don't think perl6 is worth the effort" to
> "I want perl6 yesterday".
>
> I rather have that people no longer think "Perl" when they have to do
> anything webbish. Or that they think "Web" if they hear "Perl".
Fine, but don't forget that Perl's popularity boom in the mid-90s was
largely due to the lack of competition in the web scripting sphere. For a
language to remain alive it has to appeal to more than the seasoned hacker.
New web developers are turning to PHP. I wish it were otherwise as I love
using Perl. However, mod_perl hosts are very thin on the ground. If new
students can get free PHP/MySQL hosting to learn web development they're
going to choose that over the complexity and relative unavailability of
mod_perl.
Garry
>
>
>
> Abigail
------------------------------
Date: 31 Jul 2003 14:04:25 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Web development and Perl 6
Message-Id: <slrnbii8f9.4g0.abigail@alexandra.abigail.nl>
Garry Heaton (none@none.com) wrote on MMMDCXXI September MCMXCIII in
<URL:news:ca9Wa.51147$9C6.2995836@wards.force9.net>:
== Abigail wrote:
== > Garry Heaton (none@none.com) wrote on MMMDCXXI September MCMXCIII in
== > <URL:news:4Z7Wa.51130$9C6.2994987@wards.force9.net>:
== > $$ I'm web developer who's been usinng Perl/CGI.pm for a while before swit
== > $$ to PHP.
== > $$
== > $$ IMHO if Perl 6 doesn't come with some kind of SDK for web developoment,
== > $$ at least a templating system, then it will become increasingly marginal
== > $$ in the web development world due to the proliferation of PHP within mod
== > $$ priced hosting deals.
== > $$
== > $$ It's not enough to say mod_perl/Embperl/Mason or whatever for the simpl
== > $$ reason that many new web developers and teachers use cheap hosting deal
== > $$ which invariably come fully configured with PHP/MySQL and nothing more
== > $$ standard Perl/CGI.pm. These hosts won't consider running mod_perl or an
== > $$ templatinng system. In fact I've come across many more expensive hostin
== > $$ deals with similar constraints regarding Perl. mod_perl is too great a
== > $$ for shared hosting environments.
== >
== > Oh, please. The future of Perl isn't decided by people who can't or won't
== > invest the money in their website that enables them to decide for themselves
== > which modules they have available.
==
== The future design of Perl may not be but it usage amongst new web developers
== may well be. There is currently a truckload of PHP/MySQL web development
== books available. I can only think of one, Paul Dubois, for Perl and MySQL.
== You have to ask why this is, or don't you care?
MySQL is a fairly simple database. The entire manual can be served as
a single HTML page. Which makes me wonder why there's a truckload of
PHP/MySQL books - is PHP that difficult? Because MySQL certainly isn't.
That there are only a few Perl/MySQL books sounds very logical.
Having said that, Perl has a very good database abstraction layer.
It's called DBI. In fact, Perl doesn't *need* any Perl/MySQL books.
There's the Perl/DBI book, and for each individual database there are a
ton of books. The fact there are many PHP/MySQL books gives the impression
that PHP hasn't abstracted databases as good as Perl has.
== > $$ Perl is in too many bits and pieces, at least where web development is
== > $$ concerned. DBI, DBD::mysql, mod_perl, Mason/Embperl. That's a non-start
== > $$ with most hosting deals so you're average web developer turns to PHP wh
== > $$ usually comes fully optimised without the need for additional modules.
== > $$ talking about basic bread and butter database website work here, not LW
== > $$
== > $$ Perl started out as a sysadmin tool but there's no reason to stay in th
== > $$ niche now we have Perl 6 on the way. If we don't seize the chance to bu
== > $$ a proper web development SDK with Perl 6 PHP will just become the de fa
== > $$ server-side scripting language for web development.
== >
== > I don't think that would happen. However, if that's a side effect of perl6,
== > I'd switch my opinion from "I don't think perl6 is worth the effort" to
== > "I want perl6 yesterday".
== >
== > I rather have that people no longer think "Perl" when they have to do
== > anything webbish. Or that they think "Web" if they hear "Perl".
==
== Fine, but don't forget that Perl's popularity boom in the mid-90s was
== largely due to the lack of competition in the web scripting sphere. For a
== language to remain alive it has to appeal to more than the seasoned hacker.
Really? By that definition, C wouldn't have lasted for 3 decades. Or would
you claim that C is dead?
Is Ferrarri dead because their cars don't have the prices of bicycles?
== New web developers are turning to PHP. I wish it were otherwise as I love
== using Perl. However, mod_perl hosts are very thin on the ground. If new
== students can get free PHP/MySQL hosting to learn web development they're
== going to choose that over the complexity and relative unavailability of
== mod_perl.
Students learn their trick at school. If the school can't be bothered
to give the students an appropriate learning environment, why would it
be our fault?
Abigail
--
tie $" => A; $, = " "; $\ = "\n"; @a = ("") x 2; print map {"@a"} 1 .. 4;
sub A::TIESCALAR {bless \my $A => A} # Yet Another silly JAPH by Abigail
sub A::FETCH {@q = qw /Just Another Perl Hacker/ unless @q; shift @q}
------------------------------
Date: Thu, 31 Jul 2003 14:09:24 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Web development and Perl 6
Message-Id: <x7k79y23fw.fsf@mail.sysarch.com>
>>>>> "GH" == Garry Heaton <none@none.com> writes:
GH> Abigail wrote:
GH> The future design of Perl may not be but it usage amongst new web
GH> developers may well be. There is currently a truckload of
GH> PHP/MySQL web development books available. I can only think of
GH> one, Paul Dubois, for Perl and MySQL. You have to ask why this
GH> is, or don't you care?
abigail doesn't care and neither do i. perl is NOT the web and vice
versa. you need to have that concept burned into your brain. there is
far more perl code out there that has nothing to do with the web than
the other way around. you may not understand this. and much of it has
little to do with sysadmin either. perl has long grown to beyond just a
sysadmin too.
GH> Fine, but don't forget that Perl's popularity boom in the mid-90s
GH> was largely due to the lack of competition in the web scripting
GH> sphere. For a language to remain alive it has to appeal to more
GH> than the seasoned hacker. New web developers are turning to
GH> PHP. I wish it were otherwise as I love using Perl. However,
GH> mod_perl hosts are very thin on the ground. If new students can
GH> get free PHP/MySQL hosting to learn web development they're going
GH> to choose that over the complexity and relative unavailability of
GH> mod_perl.
that is utter balderdash. perl's popularity was caused by many
factors. the web was only one little but very visible part of it. and in
fact the spread of matt's scripts and other kiddie code set perl back
manyyears IMNSHO. most professionals using perl didn't need stupid
little bulletin boards and web stuff. look at cpan and see how many
modules there are that are not web related? note that the perl community
(and matt isn't included in that) never addressed dinky web scripts
until recently (the nms project). why? because it wasn't important to
anyone's job. instead real systems like mason, all the template systems,
dbi, dbi modules and such were developed. these are used by
professionals all over the place. read some of the recent perl.com
articles on web development with them. makes php look like the silly
little toy it is.
as for perl6, it aims at no particular niche such as web or anything
else. it is meant to be a full redesign of perl to reflect all the
practical knowledge about languages that has accumulated in the field
since perl5 came out. it will still be easy to write short scripts in
perl6 but it will be possible to do things almost no other language can
do and as always in less code and still be expressive. the grammar/rules
stuff alone will make perl the best language for parsing and data
munging around. all those other langs with their (not truly) PCRE
packages will have parsing envy. the OO and class stuff will leapfrog
java and c++ and others. OO will be first class and not some interesting
and simple bolted on stuff. you haven't been reading the apocalypses and
exigeses i gather. try them out before you start another misguided rant
about perl6.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Thu, 31 Jul 2003 14:09:43 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Web development and Perl 6
Message-Id: <Hq9Wa.19494$yv1.9105@nwrddc02.gnilink.net>
Garry Heaton wrote:
> I'm web developer who's been usinng Perl/CGI.pm for a while before
> switching to PHP.
>
> IMHO if Perl 6 doesn't come with some kind of SDK for web
> developoment, ie. at least a templating system, then it will become
> increasingly marginalised in the web development world due to the
> proliferation of PHP within modestly priced hosting deals.
Sounds like a big plus to me. Maybe Perl NGs will become Perl-oriented
again?
jue
------------------------------
Date: Thu, 31 Jul 2003 11:07:55 +0000 (UTC)
From: "W K" <hyagillot@tesco.net>
Subject: win32 - kill 0 and handle leaks.
Message-Id: <bgatab$b1a$1@titan.btinternet.com>
I have a process that needs to check pids of other processes on win2000.
However, whenever when I do a kill 0, $pid - the number of handles (seen in
task manager) goes up by one.
As the process does this every minute non-stop, this gets to be a large
number of processes.
Is this a known bug/feature/mistake? Is there anything I should be doing to
clean up these handles?
The following replicates the problem - note that the "3004" must be a
process that is currently running.
for (1..5){
sleep 2;
for (1..100){kill 0,3004 }
}
print "press return";$_=<STDIN>;
------------------------------
Date: Thu, 31 Jul 2003 11:22:30 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Win32 Ole
Message-Id: <jduhiv8p2gpclupfv1ju8odu2rfmqjmsdn@4ax.com>
Mike Flannigan wrote:
>Arggg. I thought I had it this time, but I'm kinda going in circles.
>I got the Win32-OLE.zip file from that site. Installed it with:
>ppm install Win32-OLE.ppd
>
>Now when I run my Excel.pl script is says:
>"Can't call method "Workbooks" on an undefined value at
>excel.pl line 15.
No, you're *not* running in circles. This is progress. Your Win32::OLE
actually compiles now.
The problem you're having now, is that you don't have an Excel object.
>Line15 is:
>my $book = my $ex->Workbooks->Add;
>
>I'm on a Win2000 box.
Ouch. that "my $ex" certainly isn't right. You're creating a new
variable $x (which will be undefined) and try a method call on it.
You have a serious scoping problem.
>One more time, here is the whole code of Excel.pl:
>
>use strict;
>use warnings;
>
>use Win32::OLE;
>
># use existing instance if Excel is already running
>eval {my $ex = Win32::OLE->GetActiveObject('Excel.Application')};
Put the declaration outside this block, will you? Now its scope is
limited to the eval block.
>die "Excel not installed" if $@;
>unless (defined my $ex) {
That's a new $x, lilmited to the next block.
> $ex = Win32::OLE->new('Excel.Application', sub {$_[0]->Quit;})
> or die "Oops, cannot start Excel";
>}
>
># get a new workbook
>my $book = my $ex->Workbooks->Add;
Another $x
># write to a particular cell
>my $sheet = $book->Worksheets(1);
>$sheet->Cells(1,1)->{Value} = "foo";
>
># write a 2 rows by 3 columns range
>$sheet->Range("A8:C9")->{Value} = [[ undef, 'Xyzzy', 'Plugh' ],
> [ 42, 'Perl', 3.1415 ]];
>
># print "XyzzyPerl"
>my $array = $sheet->Range("A8:C9")->{Value};
>for (@$array) {
> for (@$_) {
> print defined($_) ? "$_|" : "<undef>|";
> }
> print "\n";
>}
>
># save and exit
>$book->SaveAs( 'test.xls' );
>undef $book;
>undef $ex;
These are probably unnecessary.
Let me try to repair it, without actually running it -- It'll look good
to me, but I'm not sure it'll work right:
use strict;
use warnings;
use Win32::OLE;
my $x;
# use existing instance if Excel is already running
eval {
$ex = Win32::OLE->GetActiveObject('Excel.Application')};
};
die "Excel not installed" if $@;
unless (defined $ex) {
$ex = Win32::OLE->new('Excel.Application', sub {$_[0]->Quit;})
or die "Oops, cannot start Excel";
}
# get a new workbook
my $book = $ex->Workbooks->Add;
# write to a particular cell
my $sheet = $book->Worksheets(1);
$sheet->Cells(1,1)->{Value} = "foo";
# write a 2 rows by 3 columns range
$sheet->Range("A8:C9")->{Value} = [[ undef, 'Xyzzy', 'Plugh' ],
[ 42, 'Perl', 3.1415 ]];
# print "XyzzyPerl"
my $array = $sheet->Range("A8:C9")->{Value};
for (@$array) {
for (@$_) {
print defined($_) ? "$_|" : "<undef>|";
}
print "\n";
}
# save and exit
$book->SaveAs( 'test.xls' );
undef $book;
undef $ex;
--
Bart.
------------------------------
Date: Thu, 31 Jul 2003 14:55:26 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Re: Win32 Ole
Message-Id: <3F292E6B.EF273407@earthlink.net>
Bart Lateur wrote:
> No, you're *not* running in circles. This is progress. Your Win32::OLE
> actually compiles now.
>
> The problem you're having now, is that you don't have an Excel object.
>
> >Line15 is:
> >my $book = my $ex->Workbooks->Add;
> >
> >I'm on a Win2000 box.
>
> Ouch. that "my $ex" certainly isn't right. You're creating a new
> variable $x (which will be undefined) and try a method call on it.
>
> You have a serious scoping problem.
>
> >
> ># use existing instance if Excel is already running
> >eval {my $ex = Win32::OLE->GetActiveObject('Excel.Application')};
>
> Put the declaration outside this block, will you? Now its scope is
> limited to the eval block.
Thank you very much. With just a few minor modifications
it now works perfectly. I really appreciate your willingness
to stick to this for my benefit. I'm often surprised by the
efforts Perl people will make on these groups.
I'm sure there is a good reason, but I don't understand why
they don't post modules that already have all the declarations
and everything done and ready to run as-is. Or at least I'd
like the module to run as posted if I remove the
use strict;
use warnings;
I don't mind going through and putting in the "my"s,
except when it doesn't work simply - like in this
example.
I'll try to get some good use out of this module now.
Thanks loads,
Mike
------------------------------
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 5298
***************************************