[23049] in Perl-Users-Digest
Perl-Users Digest, Issue: 5270 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 25 00:05:55 2003
Date: Thu, 24 Jul 2003 21:05: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, 24 Jul 2003 Volume: 10 Number: 5270
Today's topics:
Re: Called as method or subroutine? <REMOVEsdnCAPS@comcast.net>
Re: CGI module: getting cgi params from text file redir <grazz@pobox.com>
Re: CGI module: getting cgi params from text file redir <REMOVEsdnCAPS@comcast.net>
Re: Command too long <REMOVEsdnCAPS@comcast.net>
delete directory files from a list. Help Please <DieSpammersDie-no-spam@antigone.cotse.net>
Re: extract list from webpage <zak@mighty.co.za>
Re: extract list from webpage <zak@mighty.co.za>
Re: extract list from webpage <asu1@c-o-r-n-e-l-l.edu>
Re: extract list from webpage <bwalton@rochester.rr.com>
Re: extract list from webpage <zak@mighty.co.za>
Re: Install Perl Bin on Win32 Using Mingw (GCC) <mattogan@verizon.net>
Re: Looking for Perl school (Tad McClellan)
Re: newbie question <dhou@rohan.sdsu.edu>
Re: newbie question <asu1@c-o-r-n-e-l-l.edu>
Re: newbie question <noreply@gunnar.cc>
Re: newbie question (Tad McClellan)
Non-Core Module Inclusion (Jeff Mott)
Re: Non-Core Module Inclusion <mgjv@tradingpost.com.au>
Re: Non-Core Module Inclusion (Tad McClellan)
Re: Non-Core Module Inclusion <kalinabears@iinet.net.au>
Re: Non-Core Module Inclusion <noreply@gunnar.cc>
Problems compiling perl 5.8 on Solaris with GNU ld (vishal)
Re: Stumped by formatting - newbie plea (Tad McClellan)
Re: Stumped by formatting - newbie plea <zak@mighty.co.za>
Re: UTF-8 module <bwalton@rochester.rr.com>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 24 Jul 2003 22:15:48 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Called as method or subroutine?
Message-Id: <Xns93C2EC9247488sdn.comcast@206.127.4.25>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Steve Grazzini <grazz@pobox.com> wrote in news:M4STa.23491$0F4.22476
@nwrdny02.gnilink.net:
> You could use
>
> shift if UNIVERSAL::isa($_[0], __PACKAGE__);
Hmmm, I wasn't aware that isa worked with strings that happen to be package
names. I must consult the docs.
>> - --
>
> And what's that supposed to be? :-)
That's an ordinary "--" signature separator that was mangled by pgp :-)
- --
Eric
$_ = reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPyCgw2PeouIeTNHoEQIuOACdEcTTtn+X0JCz7cSbQ1/eX5NDE/AAn1/w
BPUTZzuXDHXF/BYZVV88TceO
=mrrn
-----END PGP SIGNATURE-----
------------------------------
Date: Fri, 25 Jul 2003 01:44:24 GMT
From: Steve Grazzini <grazz@pobox.com>
Subject: Re: CGI module: getting cgi params from text file redirected to script run on the commandline
Message-Id: <YX%Ta.24112$0F4.16085@nwrdny02.gnilink.net>
fatted <fatted@yahoo.com> wrote:
> On a linux machine running 5.6.0, this prints out the parameter keys
> (taken from file a.req), preceded by "(offline mode: enter name=value
> pairs on standard input)".
> However on a linux machine running 5.8.0, the same program and
> command line, prints nothing. (No parameters found). (And doesn't
> print the line "ofline mode...")
>
> What am I missing??
That's optional in newer versions of CGI.pm.
% perl -MCGI=-debug script.pl
--
Steve
------------------------------
Date: Thu, 24 Jul 2003 22:21:41 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: CGI module: getting cgi params from text file redirected to script run on the commandline
Message-Id: <Xns93C2ED9211F4Fsdn.comcast@206.127.4.25>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
fatted@yahoo.com (fatted) wrote in news:4eb7646d.0307240634.72e44c2
@posting.google.com:
> I have a simple program:
>
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> use CGI;
>
> my $q = new CGI;
> my @array = $q->param;
> map(print($_."\n"),@array);
>
> If I call this from the command line as:
> ./simple.pl < a.req
>
> On a linux machine running 5.6.0, this prints out the parameter keys
> (taken from file a.req), preceded by "(offline mode: enter name=value
> pairs on standard input)".
> However on a linux machine running 5.8.0, the same program and
> command line, prints nothing. (No parameters found). (And doesn't
> print the line "ofline mode...")
>
> What am I missing??
Has nothing to do with the version of perl you have installed; it's the
version of CGI.pm. For some reason which I don't fathom, the default is
not to do the "(offline mode..." thing when run from a terminal. You now
have to specify
use CGI ':debug';
in order to get that behavior. The debug option doesn't change how the
script behaves in a CGI environment. I have no clue why this change was
made -- imho, it's rather annoying.
- --
Eric
$_ = reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPyCiKGPeouIeTNHoEQKODgCghrzWdtNXzY+IEUyysr/nOK0NcXoAoJ8l
unLReWn3poRb/x9QrzPzPdU/
=P7E8
-----END PGP SIGNATURE-----
------------------------------
Date: Thu, 24 Jul 2003 22:13:56 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Command too long
Message-Id: <Xns93C2EC412923sdn.comcast@206.127.4.25>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
"Foomy" <noway@yeahright.com> wrote in news:bfoo3e$kkj$1
@coset.qualcomm.com:
> I have a customer with the following problem:
>
> Perl is trying to invoke a system account but the command line is longer
> than Windows 2k can handle. Wants to know what he can do about it. He
> believes that is the problem but isn't sure.
>
> Does this sound familiar? Please help and let me know if you need further
> details.
Upgrade to linux? ;-)
- --
Eric
$_ = reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPyCgV2PeouIeTNHoEQK9+wCff9WHgNd4f3dhejDC/yM8j8hdJkcAn1cz
VuBFFLX3uJnOPxiTfuFNd0hv
=ZI2r
-----END PGP SIGNATURE-----
------------------------------
Date: Thu, 24 Jul 2003 23:38:20 -0400 (EDT)
From: "DieSpammersDie" <DieSpammersDie-no-spam@antigone.cotse.net>
Subject: delete directory files from a list. Help Please
Message-Id: <YW50aWdvbmU=.ed819e6f4d9b2320e91bb3828d498735@1059104300.cotse.net>
Here is my problem. I want to delete the files contained in a directory
from a list contained in a file. Here is an example:
The input file is a regular text file in the following format (call it
myfile.txt);
item1
item2
item3
item4
...
What I want to do is look in a directory and delete any file in the
directory that contains any item on the list. For example, lets say the
contents of the directory looks like this:
07/24/2003 01:27 AM 3,812 heresanitem1
07/24/2003 10:42 PM 912,126 heretoitem2
07/14/2003 12:19 AM 234 item3ishere
06/12/2003 10:25 PM 34,049 leavemealone
06/12/2003 10:25 PM 16,683 leavemealonetoo
07/22/2003 11:36 PM 1,825 yupitem4yup
...
I would like to read each line of the file from "myfile.txt" [getline() I
suppose] and then delete the files that have ANY MATCHING information from
the input file. So if the input file has "item1" it will delete the file
"heresanitem1" as well as "alsoitem1aswell" from the directory. So when I
run the script the sample directory above will look like this:
06/12/2003 10:25 PM 34,049 leavemealone
06/12/2003 10:25 PM 16,683 leavemealonetoo
...
This problem has been tough for me. I have read everything I can get my
hands on concerning unlink but I cannot get this problem solved. Any help
appreciated.
------------------------------
Date: Fri, 25 Jul 2003 04:46:06 +0200
From: Zak McGregor <zak@mighty.co.za>
Subject: Re: extract list from webpage
Message-Id: <bfq5g0$qe2$1@ctb-nnrp2.saix.net>
On Fri, 25 Jul 2003 01:55:13 +0200, A. Sinan Unur <"A. Sinan Unur"
<asu1@c-o-r-n-e-l-l.edu>> wrote:
>> Here's what I'm trying to do:
>>
>> I have a webpage setup that displays all 'active' vhosts that run on my
>> webserver. This page is generated in ASP. I would like to write a
>> perl script that takes the list of 'active' vhosts and writes them to a
>> text file.
>
> Well, without some specific information regarding the format of the
> information you are trying to parse, it is hard to make a good
> recommendation. Have you looked at HTML::Parser?
Sounds like s/he's actually trying to parse the httpd configuration
files. There is probably a module to do that, check CPAN.
http://search.cpan.org/
Ciao
Zak
--
========================================================================
http://www.carfolio.com/ Searchable database of 10 000+ car specs
========================================================================
------------------------------
Date: Fri, 25 Jul 2003 04:48:53 +0200
From: Zak McGregor <zak@mighty.co.za>
Subject: Re: extract list from webpage
Message-Id: <bfq5l8$qii$1@ctb-nnrp2.saix.net>
On Fri, 25 Jul 2003 01:36:54 +0200, plb <"plb" <plb@linuxmail.org>> wrote:
> 3) delete any directory
> that is not on the list of active vhosts
May I humbly suggest not doing any actual deleting programmatically until
you're sure that your program works as expected _and_ you've fed it
unexpected input. The first few times you test, rather print the cammands
that would have been executed so that you can make sure it is not doing
anything unexpected.
Also, don't run this script with too liberal permissions. If you unlink
things as root for instance, you're tangoing with disaster.
Ciao
Zak
--
========================================================================
http://www.carfolio.com/ Searchable database of 10 000+ car specs
========================================================================
------------------------------
Date: 25 Jul 2003 02:54:53 GMT
From: "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
Subject: Re: extract list from webpage
Message-Id: <Xns93C2E91A73BF4asu1cornelledu@132.236.56.8>
Zak McGregor <zak@mighty.co.za> wrote in
news:bfq5g0$qe2$1@ctb-nnrp2.saix.net:
> On Fri, 25 Jul 2003 01:55:13 +0200, A. Sinan Unur <"A. Sinan Unur"
> <asu1@c-o-r-n-e-l-l.edu>> wrote:
>
>>> Here's what I'm trying to do:
>>>
>>> I have a webpage setup that displays all 'active' vhosts that run on
>>> my webserver. This page is generated in ASP. I would like to write
>>> a perl script that takes the list of 'active' vhosts and writes them
>>> to a text file.
>>
>> Well, without some specific information regarding the format of the
>> information you are trying to parse, it is hard to make a good
>> recommendation. Have you looked at HTML::Parser?
>
> Sounds like s/he's actually trying to parse the httpd configuration
> files. There is probably a module to do that, check CPAN.
> http://search.cpan.org/
Well, the problem description does mention the information being in a web
page generated using ASP, and part of the objective seems to be to
extract the list of 'active' vhosts from that page.
--
A. Sinan Unur
asu1@c-o-r-n-e-l-l.edu
Remove dashes for address
Spam bait: mailto:uce@ftc.gov
------------------------------
Date: Fri, 25 Jul 2003 03:00:06 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: extract list from webpage
Message-Id: <3F209D14.3020802@rochester.rr.com>
plb wrote:
...
> I have a webpage setup that displays all 'active' vhosts that run on
> my webserver. This page is generated in ASP. I would like to write a
> perl script that takes the list of 'active' vhosts and writes them to
> a text file. Then I would like to compare this list to the wwwroot
> directory on the webserver so I can delete any vhosts that are not in
> use. There is about a 300-400 difference between the webpage and
> wwwroot directory.
>
> Ideally I would like the script to:
> 1) compile a list of active vhosts
> 2) compare this list to the "wwwroot" directory
> 3) delete any directory that is not on the list of active vhosts
...
> plb
Modules are your friend. You may
use LWP::Simple;
to get() your web page. It is very simple:
use LWP::Simple;
use warnings;
use strict;
my $webpage=get('http://some.server.com/some/path...');
Then you'll need to parse the HTML to retrieve the info you want:
use HTML::Parser;
might help with that. Warning: Parsing HTML is much harder than it
looks at first glance -- that's why HTML::Parser is there. Good luck.
--
Bob Walton
------------------------------
Date: Fri, 25 Jul 2003 05:05:33 +0200
From: Zak McGregor <zak@mighty.co.za>
Subject: Re: extract list from webpage
Message-Id: <bfq6kf$qk4$1@ctb-nnrp2.saix.net>
On Fri, 25 Jul 2003 04:54:53 +0200, A. Sinan Unur <"A. Sinan Unur"
<asu1@c-o-r-n-e-l-l.edu>> wrote:
>> Sounds like s/he's actually trying to parse the httpd configuration
>> files. There is probably a module to do that, check CPAN.
>> http://search.cpan.org/
>
> Well, the problem description does mention the information being in a
> web page generated using ASP, and part of the objective seems to be to
> extract the list of 'active' vhosts from that page.
Hmmm, indeed. Apologies.
Ciao
Zak
--
========================================================================
http://www.carfolio.com/ Searchable database of 10 000+ car specs
========================================================================
------------------------------
Date: Fri, 25 Jul 2003 03:42:58 GMT
From: "Matthew Ogan" <mattogan@verizon.net>
Subject: Re: Install Perl Bin on Win32 Using Mingw (GCC)
Message-Id: <6H1Ua.65209$EZ2.36273@nwrddc01.gnilink.net>
I found the answer after having posted the question. You use g++ instead of
gcc for linking (as directed in makefile.mk). Your advice will still be
used (at least it's worth printing out). Thank you.
"Sisyphus" <kalinabears@iinet.net.au> wrote in message
news:3f1f6c4b$0$23589$5a62ac22@freenews.iinet.net.au...
>
> "Matthew Ogan" <mattogan@verizon.net> wrote in message
> news:8YITa.66021$kI5.31976@nwrddc02.gnilink.net...
> > I think I have spent enough time browsing the FAQs and generally
searching
> > the internet. What's the secret to installing as described in the
> subject.
> > I am using Dmake as descibed in README.win32 but cannot find the
Template
> > for a GCC installation. I have resolved a few errors but cannot get
past
> > the following:
> >
> > gcc -mdll -o
> > ..\perl58.dll -Wl,--base-file -Wl,perl.base -g -L"d:\programming\p
> >
erl\5.8.0\lib\MSWin32-x86-multi-thread\CORE" -L"d:\programming\MinGW\lib"
> \
> > C:\Temp\mk00022a
> >
> > where "d:\programming" is my root directory.
> >
>
> Presumably that's part of what you get when you run dmake.
> What was the error that was generated ?
>
> Not sure of what you mean by a "Template for a GCC installation."
>
> Here's a copy of some notes I kept from when I built 5.6.1 with gcc. Don't
> treat them as Gospel, but there might be something there that helps. I
used
> gcc-2.95.2, but I gather later versions are quite suitable.
> ------------------------------------------------
> Downloaded gcc-2.95.2 and dmake from the links provided in the perl source
> 'README.win32'.
>
> I downloaded the entire gcc-2.95.2 folder, but you only need these items
> from it:
> README
> fixes/README.quote-fix
> INSTALL
> mingw32-docs-html.exe (optional)
> gcc-2.95.2-msvcrt.exe
> fixes/quote-fix-msvcrt.exe
> runtime-source-19991107.zip (I assume this is needed ... perhaps not)
>
> Ran gcc-2.95.2-msvcrt.exe, then ran quote-fix-msvcrt.exe.
>
> My perl source was build 626 source from activeState.
>
> Amended makefile.mk as per instructions contained within.
>
> Also changed line ~ 422 from:
> OPTIMIZE = -g -O2
> LINK_DBG =
>
> to:
> OPTIMIZE = -O2
> LINK_DBG =
>
> Otherwise you get a very big perl.exe and perl56.dll.
>
> For further size reduction maybe change the second line to:
> LINK_DBG = -s
> (I didn't bother with that)
>
> Had to amend 'stdio.h' as mentioned in perl source 'README.win32'.
>
> Added my \dmake\bin and my \gcc\bin to the path.
>
> Ran 'dmake', 'dmake test' and 'dmake install'.
>
> Add my \perl\bin to the path and we're away !!
> -----------------------------------------------
>
> > Flaming is welcome as long as accompanied by an answer.
> >
>
> Haven't supplied an answer ..... so I'm not allowed to flame .... damn!
:-)
>
> (I wouldn't do that, anyway.)
>
> Cheers,
> Rob
>
>
------------------------------
Date: Thu, 24 Jul 2003 22:02:37 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Looking for Perl school
Message-Id: <slrnbi17ed.9j6.tadmc@magna.augustmail.com>
Gerald Newton <senior_citizen@alaska.com> wrote:
> I am looking for an onsite Perl school of 4 to 5 weeks.
I don't know of any with that duration.
You might try the "Continuing Education" department of colleges
near where you live.
There is also a list of Perl training organizations at:
http://www.perltraining.org/USA
> This school would
> be for computer literate people who have previous programming experience,
> but are not professional programmers.
Stonehenge offers classes suitable for that audience.
> The school would have about 4 hours
> in class and a daily workshop where students would use their own laptops or
> school machines to practice with an instructor on hand.
Stonehenge's classes are generally 4 days, 7 contact-hours per day,
split about 60/40 lecture/lab. Computers are provided.
> The cost would be
> about $3 to $5 thousand not including board and room.
The cost for a 4-day Stonehenge open-enrollment class is about $1600.
So for about $3200 you could have both the "Learning Perl" and
"Learning Perl Objects, References & Modules" courses, which are
the basis of the O'Reilly books of the same names.
Contact me if you'd like more info.
--
Tad McClellan tad@stonehenge.com
Director of Sales and Operations
Stonehenge Consulting Services
------------------------------
Date: 25 Jul 2003 01:39:08 GMT
From: hou <dhou@rohan.sdsu.edu>
Subject: Re: newbie question
Message-Id: <bfq1ns$bmu$1@gondor.sdsu.edu>
> Hello. If you haven't done so already, please consult the posting
> guidelines for this newsgroup. I mention this because you subject line
> contains no information as to the nature of your question, and it looks
> like you have not checked documentation available to you.
Thank you for helping me.
I am new to the newsgroup and there are lots of info out there.
Would you please tell me how to locate the posting guidelines?
------------------------------
Date: 25 Jul 2003 02:36:52 GMT
From: "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
Subject: Re: newbie question
Message-Id: <Xns93C2E60D11812asu1cornelledu@132.236.56.8>
hou <dhou@rohan.sdsu.edu> wrote in news:bfq1ns$bmu$1@gondor.sdsu.edu:
>> Hello. If you haven't done so already, please consult the posting
>> guidelines for this newsgroup. I mention this because you subject line
>> contains no information as to the nature of your question, and it looks
>> like you have not checked documentation available to you.
>
> Thank you for helping me.
> I am new to the newsgroup and there are lots of info out there.
> Would you please tell me how to locate the posting guidelines?
http://mail.augustmail.com/~tadmc/clpmisc.shtml
--
A. Sinan Unur
asu1@c-o-r-n-e-l-l.edu
Remove dashes for address
Spam bait: mailto:uce@ftc.gov
------------------------------
Date: Fri, 25 Jul 2003 05:09:32 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: newbie question
Message-Id: <bfq70c$hb1ok$1@ID-184292.news.uni-berlin.de>
A. Sinan Unur wrote:
> hou <dhou@rohan.sdsu.edu> wrote:
>>Would you please tell me how to locate the posting guidelines?
>
> http://mail.augustmail.com/~tadmc/clpmisc.shtml
Maybe it would be a good idea to append that URL to the bottom of
every message, like they do at ciwac. Would that be possible, Tad?
Just a thought.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Thu, 24 Jul 2003 21:44:28 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: newbie question
Message-Id: <slrnbi16cc.9j6.tadmc@magna.augustmail.com>
hou <dhou@rohan.sdsu.edu> wrote:
> Would you please tell me how to locate the posting guidelines?
I'll do better than that. I tell you how you can locate lots of things.
There are "search engines" that can locate things on the web.
A popular search engine is www.google.com.
Entering
perl posting guidelines
in the little box there will find them.
Or, read the newsgroup regularly, they are posted twice each week.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 24 Jul 2003 19:03:46 -0700
From: mjeff1@twcny.rr.com (Jeff Mott)
Subject: Non-Core Module Inclusion
Message-Id: <970676ed.0307241803.30cb6d4f@posting.google.com>
If your program/module uses modules not within the core distribution,
is it acceptable practice to package with it a copy of that module?
Particularly in the case of XS extensions. Is an XS module built on
one system the same as any another? Or should I just inform the user
which modules they must install?
------------------------------
Date: 25 Jul 2003 02:56:49 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: Non-Core Module Inclusion
Message-Id: <slrnbi173j.d0q.mgjv@verbruggen.comdyn.com.au>
On 24 Jul 2003 19:03:46 -0700,
Jeff Mott <mjeff1@twcny.rr.com> wrote:
> If your program/module uses modules not within the core distribution,
> is it acceptable practice to package with it a copy of that module?
> Particularly in the case of XS extensions. Is an XS module built on
> one system the same as any another? Or should I just inform the user
> which modules they must install?
It's easiest if you just tell the users which modules they need to
install. That way they can do it in the way they are used to doing
it[1]. This also allows people to keep the module that you rely on up
to date, independently of your distribution. Since they need to
install your module anyway, they should already know how to do that.
The next best alternative is to include a copy of the original tar
file of the distribution you want added, _if_ the license of that
module allows you to do that.
It is not a good idea to roll the source files of that module into
your own package, because you just enter maintenance hell. You would
also need to come up with some mechanism to avoid installing your
copies of that module if a valid copy already exists on the system.
This is much more trouble than it ever can be worth.
Distributing binaries is only going to be successful if you can
precompile and package the module for each version of each OS and each
version of each Perl you are going to need it for. Binaries are
generally not compatible between OSes, and often not compatible
between various versions of Perl.
Martien
[1] not everyone maintains their Perl installation by compiling and
installing stuff themselves by hand, or via the CPAN module. there's
Activestate distributions and their ppm tools. There are Linux
distributions that pre-package perl modules. Pre-compiled Solaris
packages are available for Perl modules.
--
|
Martien Verbruggen | Little girls, like butterflies, need no
Trading Post Australia | excuse - Lazarus Long
|
------------------------------
Date: Thu, 24 Jul 2003 21:39:23 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Non-Core Module Inclusion
Message-Id: <slrnbi162r.9j6.tadmc@magna.augustmail.com>
Jeff Mott <mjeff1@twcny.rr.com> wrote:
> Is an XS module built on
> one system the same as any another?
No.
Compiling C depends on the libraries that the compiler uses.
Different systems may have different libraries.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 25 Jul 2003 13:07:03 +1000
From: "Sisyphus" <kalinabears@iinet.net.au>
Subject: Re: Non-Core Module Inclusion
Message-Id: <3f209fe5$0$23586$5a62ac22@freenews.iinet.net.au>
"Jeff Mott" <mjeff1@twcny.rr.com> wrote in message
news:970676ed.0307241803.30cb6d4f@posting.google.com...
> If your program/module uses modules not within the core distribution,
> is it acceptable practice to package with it a copy of that module?
> Particularly in the case of XS extensions. Is an XS module built on
> one system the same as any another?
No. The pure perl parts are (obviously) the same, but the compiled binaries
will be different. For those users who have the same OS as you, you could do
as you're suggesting. (Or you could even provide separate binaries for a
range of operating systems, as ActiveState do in regard to their ppm
packages.)
Also be aware that 5.6 and 5.8 require different binaries.
Or should I just inform the user
> which modules they must install?
This is the more usual way, which you'd normally do by specifying
'PREREQ_PM' in the WriteMakefile() section of your module's Makefile.PL. (A
good idea to mention it in the readme, too.)
Cheers,
Rob
------------------------------
Date: Fri, 25 Jul 2003 05:38:56 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Non-Core Module Inclusion
Message-Id: <bfq8nh$hpnmg$1@ID-184292.news.uni-berlin.de>
Jeff Mott wrote:
> If your program/module uses modules not within the core
> distribution, is it acceptable practice to package with it a copy
> of that module? Particularly in the case of XS extensions. Is an XS
> module built on one system the same as any another? Or should I
> just inform the user which modules they must install?
I read Martien's reply to your question, and it appeared to be good
advise. But only sometimes. I'd say it depends on which kind of
program it is, and the target audience for it.
I have a CGI program, where I include a few non-core (not XS
extensions, though) modules from CPAN. The users of my program are
typically on shared web accounts, most often without shell access.
Accordingly, they simply upload the modules via FTP to a program
specific Perl library.
The program includes a
use lib 'lib';
command, which makes the program specific path the first path in @INC,
and accordingly 'my' distributed copies are always loaded whether they
were already installed as a part of the Perl installation or not. (But
not when running other programs, of course.)
To be honest, I can't think of doing it in any other way.
Now, would the just described method be bad practice? Personally I
can't see why.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 24 Jul 2003 20:32:40 -0700
From: planetjeans@hotmail.com (vishal)
Subject: Problems compiling perl 5.8 on Solaris with GNU ld
Message-Id: <e09c438a.0307241932.6cbe49b0@posting.google.com>
Hello there,
I had problems when compiling perl with GNU ld (binutils package).
Therefore I had to compile perl using the utilities that came with sun
(/usr/ccs/bin). The make always failed with an error like miniperl
something and complained about floor, socket etc being unreferenced.
Is there something I could have done to compile perl with GNU ld
successfully ?
Regards,
VS
------------------------------
Date: Thu, 24 Jul 2003 20:10:43 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Stumped by formatting - newbie plea
Message-Id: <slrnbi10sj.9ee.tadmc@magna.augustmail.com>
Peter Stokes <peterstokes@operamail.com> wrote:
> Subject: Stumped by formatting - newbie plea
^^^^^^^^^^^
Have you seen the Posting Guidelines that are posted here frequently?
Carefully choose the contents of your Subject header
You have 40 precious characters of Subject to win out and be one of
the posts that gets read. Don't waste them. Take care while
composing them, they are the key that opens the door to getting an
answer.
Spend them indicating what aspect of Perl others will find if they
should decide to read your article.
Do not spend them indicating "experience level" (guru, newbie...).
Do not spend them pleading (please read, urgent, help!...).
...
> open (INFILE, "db1.dat");
You should always, yes *always*, check the return value from open():
open (INFILE, 'db1.dat') or die "could not open 'db1.dat' $!";
> If I:
> print "<option value=\"@counties\">@counties\n";
What does @countries contain at this point?
> I get a list which includes formatting on the lines that have been
> removed, so the result looks like:
> <option value="Berkshire">Berkshire
> <option value="Dorset">Dorset
> <option value="">
> <option value="">
> <option value="Gloucestershire">Gloucestershire
> ...and so on.
I don't see how the code above can produce the output you claim.
Do you have a short and complete program that we can run that
illustrates the problem you are having?
If you can do that, then we can surely answer your question...
> Please can anyone suggest where I'm going wrong.
Not showing us Real Code.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 25 Jul 2003 04:40:29 +0200
From: Zak McGregor <zak@mighty.co.za>
Subject: Re: Stumped by formatting - newbie plea
Message-Id: <bfq55f$qci$1@ctb-nnrp2.saix.net>
On Fri, 25 Jul 2003 01:20:51 +0200, Peter Stokes <"Peter Stokes"
<peterstokes@operamail.com>> wrote:
[snip]
Others have already pointed you to the correct way of eliminating
duplicates from an array. The method I snipped was not going to work.
> This is where I'm having the problem. If I now:
> print @counties;
> I get a solid line of text. I need to format this. If I:
> print "<option value=\"@counties\">@counties\n";
> I get a list which includes formatting on the lines that have been
> removed, so the result looks like:
> <option value="Berkshire">Berkshire
> <option value="Dorset">Dorset
> <option value="">
> <option value="">
> <option value="Gloucestershire">Gloucestershire
> ...and so on.
Um, no you don't.
> Please can anyone suggest where I'm going wrong.
Maybe one of the other guys has a better solution, but I'd be looking at
map right now if I were you.
perldoc -f map
HTH
Ciao
Zak
--
========================================================================
http://www.carfolio.com/ Searchable database of 10 000+ car specs
========================================================================
------------------------------
Date: Fri, 25 Jul 2003 02:52:44 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: UTF-8 module
Message-Id: <3F209B5A.7010908@rochester.rr.com>
Jerry Maguire wrote:
> Hi,
> Is there any module to encode a URL into UTF-8 format? I have looked at cpan
> and could not find anything.
> At the moment I am using MIME::base64 perl module to do URL
> encoding/decoding but also need a UTF-8 encoding/decoding.
>
>
> Thanks
> Jerry
>
>
>
UTF-8 support is native in Perl 5.8. See:
perldoc perluniintro
and
perldoc perlunicode
--
Bob Walton
------------------------------
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 5270
***************************************