[22081] in Perl-Users-Digest
Perl-Users Digest, Issue: 4303 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Dec 22 14:05:39 2002
Date: Sun, 22 Dec 2002 11:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 22 Dec 2002 Volume: 10 Number: 4303
Today's topics:
Design Tools and Resources on one page . . . it is fair <asg779e@earthlink.net>
Re: Design Tools and Resources on one page . . . it is (Tad McClellan)
Re: Getting perl to work on XP. (stew dean)
Re: Getting perl to work on XP. (stew dean)
Re: Getting perl to work on XP. (Tad McClellan)
Re: Getting perl to work on XP. <wsegrave@mindspring.com>
Re: Help with require problem <tony_curtis32@yahoo.com>
Re: joining a list of files (Douglas Wilson)
Re: joining a list of files <krahnj@acm.org>
Line delimiters in Win32 Perl (T Conti)
Re: Line delimiters in Win32 Perl (Tad McClellan)
Modifying E-mail header <sjcole@nospam.hotmail.com>
Re: Modifying E-mail header (Tad McClellan)
Re: Modifying E-mail header <tony_curtis32@yahoo.com>
Re: Ooops <d.adamkiewicz@i7.com.pl>
Re: Perl2Exe - Missing modules in @INC? <ian@WINDOZEdigiserv.net>
Re: Perl2Exe - Missing modules in @INC? <ian@WINDOZEdigiserv.net>
Re: Perl2Exe - Missing modules in @INC? <kevin@vaildc.net>
Re: Perl2Exe - Missing modules in @INC? <ian@WINDOZEdigiserv.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 22 Dec 2002 18:06:03 GMT
From: "gbd" <asg779e@earthlink.net>
Subject: Design Tools and Resources on one page . . . it is fairly extensive!
Message-Id: <fanN9.1292$b97.131110@newsread2.prod.itd.earthlink.net>
I spent some time researching these sites and this page is the results of
that research. This information will aid anybody in web design/development.
I am not selling anything - I just want
to share this information. I found alot of sites that were a waste of time
and this collection of links is the best of what I found available. I hope
it benefits all.
Thanks.
http://www.goodboysdo.net/GBDwres.htm
gbd
------------------------------
Date: Sun, 22 Dec 2002 12:16:51 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Design Tools and Resources on one page . . . it is fairly extensive!
Message-Id: <slrnb0c0cj.9q9.tadmc@magna.augustmail.com>
gbd <asg779e@earthlink.net> wrote:
> I spent some time researching these sites and this page is the results of
> that research.
comp.lang.perl is a non-existant newsgroup.
It was rmgroup'd many years ago.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 22 Dec 2002 09:06:36 -0800
From: stewart@webslave.dircon.co.uk (stew dean)
Subject: Re: Getting perl to work on XP.
Message-Id: <2b68957a.0212220906.3018939e@posting.google.com>
helgi@decode.is (Helgi Briem) wrote in message news:<3e031d42.1359024474@news.cis.dfn.de>...
> On 20 Dec 2002 05:13:33 -0800, stewart@webslave.dircon.co.uk
> (stew dean) wrote:
>
> >Simple task. I've Installed apache and set it up as a service on XP.
> >Install activestate perl
> >
> >Server works - can see default page.
> >
> >Access perl script in cgi-bin file and it tries to download it.
> >
> >Now where do I go next? Is there a page which tells me what I should
> >be doing. I've been following all kinds of different pages and none of
> >this has worked.
> >
> >I'm getting really hacked off with this but it's got to be done. What
> >do I tweak to get this to work?
>
> Your question has nothing to do with Perl.
> Your question has nothing to do with XP
> Your question has nothing to do with Activestate Perl.
>
The question has to do with perl, activestate perl, xp, and apache.
> Your question has to do with web server configuration.
Correct.
> Read the installation and configuration instructions
> for apache that came with your installation. They
> are also online at www.apache.org.
Oddly enough they don't cover XP.
> If you have problems, address them to a newsgroup
> where web server configuration, such as
> comp.infosystems.www.servers.*
It's been a long time since I've met pedantic pricks like you online.
Thanks for being obnoxoius but I will take a look over at the servers
group.
Stew Dean
------------------------------
Date: 22 Dec 2002 09:10:17 -0800
From: stewart@webslave.dircon.co.uk (stew dean)
Subject: Re: Getting perl to work on XP.
Message-Id: <2b68957a.0212220910.697574e@posting.google.com>
"William Alexander Segraves" <wsegrave@mindspring.com> wrote in message news:<au0sg3$m$1@slb9.atl.mindspring.net>...
> "stew dean" <stewart@webslave.dircon.co.uk> wrote in message
> news:2b68957a.0212200513.309bf8ae@posting.google.com...
> <snip>
> > I'm getting really hacked off with this but it's got to be done. What
> > do I tweak to get this to work?
>
> WADR, the first thing you need to tweak is your attitude. You'll learn a lot
> faster if you do your own research, attempting to solve your own problems,
> rather than expecting others to come up with instant wisdom for *you*.
What makes you think I havnt been doing that?!?! Do you think I would
be asking the question if the documentation told me what to do and I
couldnt find an existing post/web site that explained what to do?
I set up perl on IIs with no problems after two tweaks I found in a
newsgroup posting. The apache windows documentation is not very good.
> That said (written), with good intentions for a positive effect, I'd
> recommend you download and install IndigoPerl, available free from
> www.indigostar.com. On installation, you'll have Perl and Apache working on
> your XP system. No troubles --it's pre-configured.
Okay - I'll give that a go. Thanks for some helpful advice even if you
did manage to patronise me in the process.
Stew Dean
------------------------------
Date: Sun, 22 Dec 2002 11:27:42 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Getting perl to work on XP.
Message-Id: <slrnb0btge.9h2.tadmc@magna.augustmail.com>
stew dean <stewart@webslave.dircon.co.uk> wrote:
> helgi@decode.is (Helgi Briem) wrote in message news:<3e031d42.1359024474@news.cis.dfn.de>...
>> On 20 Dec 2002 05:13:33 -0800, stewart@webslave.dircon.co.uk
>> (stew dean) wrote:
>> >Access perl script in cgi-bin file and it tries to download it.
>> Your question has to do with web server configuration.
>
> Correct.
This newsgroup is not about web server configuration.
This newsgroup is about Perl.
>> If you have problems, address them to a newsgroup
>> where web server configuration, such as
>> comp.infosystems.www.servers.*
You've asked your question in the wrong place.
Helgi pointed out a better place.
> It's been a long time since I've met pedantic pricks like you online.
Ingrate.
*plonk*
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 22 Dec 2002 12:56:22 -0600
From: "William Alexander Segraves" <wsegrave@mindspring.com>
Subject: Re: Getting perl to work on XP.
Message-Id: <au527i$qor$1@slb9.atl.mindspring.net>
"stew dean" <stewart@webslave.dircon.co.uk> wrote in message
news:2b68957a.0212220910.697574e@posting.google.com...
> "William Alexander Segraves" <wsegrave@mindspring.com> wrote in message
news:<au0sg3$m$1@slb9.atl.mindspring.net>...
> > "stew dean" <stewart@webslave.dircon.co.uk> wrote in message
> > news:2b68957a.0212200513.309bf8ae@posting.google.com...
> > <snip>
> > > I'm getting really hacked off with this but it's got to be done. What
> > > do I tweak to get this to work?
> >
> > WADR, the first thing you need to tweak is your attitude. You'll learn a
lot
> > faster if you do your own research, attempting to solve your own
problems,
> > rather than expecting others to come up with instant wisdom for *you*.
>
> What makes you think I havnt been doing that?!?!
Do you mean tweaking your attitude? Your sentences above motivated the
comment. Seriously, all of my comments are aimed at helping you to get more
productive responses in this newsgroup.
No offense was intended.
> Do you think I would
> be asking the question if the documentation told me what to do and I
> couldnt find an existing post/web site that explained what to do?
>
If you're a beginner with Perl, it is understandable that you might not know
initially what questions to ask. That's why you should start with the
posting guidelines *before* posting to this newsgroup. If it's evident from
your approach that you haven't followed the guidelines, you'll get terse,
but not ugly, responses from some of the participants.
You'll only diminish yourself if you respond angrily to a response that
doesn't meet your
acceptance criteria. Imagine the pride your parents will experience when
they see the results of a Google Groups search for "Stew Dean Perl Apache
pedantic" and I think you'll see my point.
> I set up perl on IIs with no problems after two tweaks I found in a
> newsgroup posting.
Good! I hope you found said posting via a google or google groups search.
Google can be very helpful to you.
>The apache windows documentation is not very good.
>
That's off-topic for this newsgroup. Why not try www.apache.org (as
suggested by HB)?
> > That said (written), with good intentions for a positive effect, I'd
> > recommend you download and install IndigoPerl, available free from
> > www.indigostar.com. On installation, you'll have Perl and Apache working
on
> > your XP system. No troubles --it's pre-configured.
>
> Okay - I'll give that a go. Thanks for some helpful advice even if you
> did manage to patronise me in the process.
As I wrote earlier, no offense was intended. FWIW, installation of
IndigoPerl on my son's XP Pro system was a no-brainer, i.e., install it and
it works.
Happy Holidays!
Bill Segraves
------------------------------
Date: Sun, 22 Dec 2002 10:59:49 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Help with require problem
Message-Id: <87d6nu6lbu.fsf@limey.hpcc.uh.edu>
>> On Sun, 22 Dec 2002 00:34:24 -0500,
>> planB@newsreaders.com (J.B. Moreno) said:
> I'm calling a perl script from a php page. When I first
> tried this I thought it wasn't working at all, because
> it wasn't returning anything, but when I put in some
> error messages I found otherwise.
> Basically, it dies (no error message) when it hits a
> require statement.
> #!/usr/local/bin/perl require "ssi.lib" print "After";
> Doesn't do anything, while
> #!/usr/local/bin/perl print "Before"; require "ssi.lib"
> print "After";
> prints out "Before" but not "After".
> I realize this is most likely a problem with the
> environment, and if so I apologize, but I can't be sure
> and I can't think of a better place to ask.
> #!/usr/local/bin/perl
use warnings;
use strict;
> require "ssi.lib" <-- ";" missing
> print "After";
gives you:
syntax error at - line 2, near "print"
Execution of - aborted due to compilation errors.
Running it on the command-line is the simplest test.
hth
t
------------------------------
Date: Sun, 22 Dec 2002 11:18:19 GMT
From: dwilson@gtemail.net (Douglas Wilson)
Subject: Re: joining a list of files
Message-Id: <3e059c4d.68282164@news.west.cox.net>
On Sun, 22 Dec 2002 04:01:07 -0500, "Propellor Head" <seamuscarr@mindspring.com>
wrote:
>I'm guessing that this is a newbie question, so I hope I don't get flamed
>too badly. I have a list of files that are related by date, 2 files for
>each date, and I need to join them together. I'm hoping that once this is
>completed, I can use it as a subroutine for the rest of the 1000's of files
>that need to be joined then processed. So here it is:
>ZKG36000.ARC
>as you can tell, I'm trying to append the ZKL* files to the ZKG* files, but
You seem to want to append a ZKL###### file to a ZKG###### file
where the '######' of each file matches, but you don't make sure each
file has a mate, you just assume that it exists, which is probably not a
good thing to assume (no matter how sure you are that it does exist, you
will be sorry when it doesn't). It might be better if you did something like
this:
use File::Copy;
while (my $file = glob("ZKL*.ARC')) {
$file =~ /^ZKL(\d+).ARC/ or warn("Bad filename $file"), next;
open(OUT, ">>ZKG$1.ARC) or warn("Error opening ZKG$1.ARC: $!"), next;
copy($file, \*OUT) or warn("Error copying $file: $!"), next;
close OUT;
}
HTH,
Douglas Wilson
------------------------------
Date: Sun, 22 Dec 2002 14:30:45 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: joining a list of files
Message-Id: <3E05CC3D.34DBF25F@acm.org>
Propellor Head wrote:
>
> I'm guessing that this is a newbie question, so I hope I don't get flamed
> too badly. I have a list of files that are related by date, 2 files for
> each date, and I need to join them together. I'm hoping that once this is
> completed, I can use it as a subroutine for the rest of the 1000's of files
> that need to be joined then processed. So here it is:
> ZKG36000.ARC
> [snip]
> ZKG36600.ARC
> ZKL36000.ARC
> [snip]
> ZKL36600.ARC
> this is the list of files
> #!/usr/local/bin/perl -w
> #subroutine to open each day's file for input
> #and join them into 1 file for processing
> while (defined($lfilename = glob("ZKL*.ARC")) ) {
> open (LFILE, $lfilename) || die "can't find file: $!";
> }
> while (defined($gfilename = glob("ZKG*.ARC")) ) {
> open (GFILE, '>>$gfilename') || die "can't find file: $!";
> }
> while(<LFILE>) {
> print GFILE $_
> }
> this is the program
> as you can tell, I'm trying to append the ZKL* files to the ZKG* files, but
> it errors out after the first pass. I've looked through all the FAQ's and
> none of them seem to help. The main question is, how can I glob the read
> file for each occurence.
#!/usr/local/bin/perl -w
use strict;
use File::Copy;
#subroutine to open each day's file for input
#and join them into 1 file for processing
while ( $lfile = glob "ZKL*.ARC" and $gfile = glob "ZKG*.ARC" ) {
open GFILE, ">>$gfile or die "Cannot open $gfile: $!";
copy( $lfile, \*GFILE ) or die "Cannot copy $lfile: $!";
}
John
--
use Perl;
program
fulfillment
------------------------------
Date: 22 Dec 2002 09:02:06 -0800
From: tconti@hotmail.com (T Conti)
Subject: Line delimiters in Win32 Perl
Message-Id: <5e0d3eda.0212220902.3e0a922d@posting.google.com>
Hello:
I have run into an anomaly that I am seeking some explanation of in
Win32 perl. I am writing a service that reads in a file. This could
be a Unix or windows file. The lines in the Unix file will be
terminated by \n (OA) and the lines in the windows file are delimited
by \r\n (0D 0A). I use chomp to rip the delimiter from the line and I
noticed that it is removes the \n from the first file as expected, but
it also hack off \r\n from the second file. This is confusing. I
append a \n to the end of the line and when I view the file in hex the
lines are delimited by \r\n. Does anyone have any input on this
behavior? Do I need to set a property in Perl to modify this behavior?
Thanks,
Tom
------------------------------
Date: Sun, 22 Dec 2002 12:02:58 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Line delimiters in Win32 Perl
Message-Id: <slrnb0bvii.9h2.tadmc@magna.augustmail.com>
T Conti <tconti@hotmail.com> wrote:
> I have run into an anomaly that I am seeking some explanation of in
> Win32 perl. I am writing a service that reads in a file. This could
> be a Unix or windows file. The lines in the Unix file will be
> terminated by \n (OA)
Those are NOT equivalent.
\n is a _logical_ "end of line".
ASCII OA is a physical "end of line" on _some OSes_.
> and the lines in the windows file are delimited
> by \r\n (0D 0A). I use chomp to rip the delimiter from the line and I
> noticed that it is removes the \n from the first file as expected, but
> it also hack off \r\n from the second file. This is confusing. I
> append a \n to the end of the line and when I view the file in hex the
> lines are delimited by \r\n. Does anyone have any input on this
> behavior? Do I need to set a property in Perl to modify this behavior?
For "text" files, CR-LF is translated to \n by Perl's input routines,
and \n to CR-LF in the output routines (if on Windows).
Treat the files as "binary" rather than "text" files to get
more precise control of line ending sequences.
perldoc -f binmode
This includes turning off possible CRLF translation
...
On some systems (in general, DOS and Windows-based
systems) binmode() is necessary when you're not
working with a text file.
...
The operating system, device drivers, C libraries,
and Perl run-time system all work together to let
the programmer treat a single character ("\n") as
the line terminator, irrespective of the external
representation. On many operating systems, the
native text file representation matches the inter
nal representation, but on some platforms the
external representation of "\n" is made up of more
than one character.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 22 Dec 2002 12:33:28 -0000
From: "Steve C" <sjcole@nospam.hotmail.com>
Subject: Modifying E-mail header
Message-Id: <1040560207.565826@ananke.eclipse.net.uk>
Hi,
I'm running Exim and have a requirement to re-write e-mail message headers
when mail is sent to certain recipients.
Exim has some rules for doing address rewriting but the needs are quite
specific so I'm going to have to do it with perl.
The e-mail is passed to a perl script which takes the e-mail on its STDIN.
What I'm trying to do, is take the From: header and replace it with an
arbitary e-mail address, then seek to put the original From: recipient
e-mail address either on the end of the subject line OR in the first line of
the message body.
This gets difficult if the e-mail contains html aswell as plain/text.
Anyway I need to make the changes and then pass the whole message to the
STDOUT which will return it to Exim for delivery.
I'm beginning to pull out hair over this one. Does anyone know of any
examples where message bodies and headers are changed using perl ? I could
do it in PHP but I don't reckon it would be as efficient and could slow down
the mail server too much.
If anyone could help with any pointers on doing this re-writing I would be
extremely grateful.
Many Thanks
Steve C
------------------------------
Date: Sun, 22 Dec 2002 11:17:54 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Modifying E-mail header
Message-Id: <slrnb0bsu2.9f8.tadmc@magna.augustmail.com>
Steve C <sjcole@nospam.hotmail.com> wrote:
[ the stuff in __DATA__ below ]
-------------------------------------------------
#!/usr/bin/perl
use strict;
use warnings;
my $orig_from;
while ( <DATA> ) {
if ( s/^From: (.*)/From: arbitary e-mail address/ )
{ $orig_from = $1 }
if ( /^\s*$/ ) {
print;
print "Originally From: $orig_from\n\n";
last;
}
print;
}
print while <DATA>; # all the rest
__DATA__
From: sjcole@nospam.hotmail.com
To: sjcole@nospam.hotmail.com
Subject: Modifying E-mail header
What I'm trying to do, is take the From: header and replace it with an
arbitary e-mail address, then seek to put the original From: recipient
e-mail address either on the end of the subject line OR in the first line of
the message body.
I'm beginning to pull out hair over this one. Does anyone know of any
examples where message bodies and headers are changed using perl ?
-------------------------------------------------
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 22 Dec 2002 12:24:30 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Modifying E-mail header
Message-Id: <87adix7vz5.fsf@limey.hpcc.uh.edu>
>> On Sun, 22 Dec 2002 12:33:28 -0000,
>> "Steve C" <sjcole@nospam.hotmail.com> said:
> Hi, I'm running Exim and have a requirement to re-write
> e-mail message headers when mail is sent to certain
> recipients. Exim has some rules for doing address
> rewriting but the needs are quite specific so I'm going
> to have to do it with perl. The e-mail is passed to a
> perl script which takes the e-mail on its STDIN.
> What I'm trying to do, is take the From: header and
> replace it ...
> make the changes and then pass the whole message to the
> STDOUT which will return it to Exim for delivery.
> I'm beginning to pull out hair over this one. Does
> anyone know of any examples where message bodies and
> headers are changed using perl ? I could do it in PHP
> but I don't reckon it would be as efficient and could
> slow down the mail server too much.
MIME::Tools or MIME::Lite probably has what you want in
it. You can grab these from CPAN, see e.g.
http://search.cpan.org/search?query=mime&mode=all
hth
t
------------------------------
Date: Sun, 22 Dec 2002 15:09:13 +0100
From: Darek Adamkiewicz <d.adamkiewicz@i7.com.pl>
Subject: Re: Ooops
Message-Id: <3E05C789.3050301@i7.com.pl>
> and
> Windows-native - Win32::GUI
> http://sourceforge.net/projects/perl-win32-gui/
If had read first message in this thread, I'd have known
that this concerned x-windows GUI toolkits.
Sorry about that.
D.
------------------------------
Date: Sun, 22 Dec 2002 13:16:52 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: Perl2Exe - Missing modules in @INC?
Message-Id: <2meb0vg6ae03oml4u7ljq5qvq60siulrbo@4ax.com>
Keywords: Remove WINDOZE to reply
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
In a fit of excitement on Sun, 22 Dec 2002 00:06:08 -0500, Kevin
Michael Vail <kevin@vaildc.net> managed to scribble:
> In article <nkr80vknmoc5e23kg8k14ir245qqqgf52g@4ax.com>,
> "Ian.H [dS]" <ian@WINDOZEdigiserv.net> wrote:
>
> > I've written a script that runs fine as a .pl script but fails
> > miserably when compiled with Perl2Exe. The error is:
> >
> [snip]
> >
> > Before anyone asks, I've RTFM regarding this in the Perl2Exe doc
> > and it reports that I should for this situation add:
> >
> > use LWP::Protocol::ftp;
>
> I'm assuming that adding this fixed the problem?
I stopped working on the project at the time (it's a recreational
project so didn't have to be done there and then).
I'll work through nd add all the extras that it asks for and try again.
>
> [snip]
> >
> > The part that confuses me, is why does this run with no errors or
> > warnings as a script but not after compilation?
>
> Because when you're running it as a script, Perl goes and looks for
> that module when it's needed. But if Perl2Exe doesn't know to
> package up that module when it's compiling the program, it won't
> exist when it's needed (compiled programs won't look in the standard
> Perl locations for modules). Noticed that the error message
> mentions the contents of @INC, and that the normal Perl directories
> are *not* present there.
I see. Thanks Kevin, this info is most useful.
I've only used Perl2Exe a couple of times and the scripts then didn't
include any modules so all went fine.
Thanks again.. and Merry Xmas =)
Regards,
Ian
-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3
iQA/AwUBPgW7Qmfqtj251CDhEQIeiACfTII3lXbOGVHk6GE4UgLjHIqD9/gAnR25
iTvfj2mP3fcHWUGrpavFBVup
=uoQZ
-----END PGP SIGNATURE-----
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Scripting, Web design, development & hosting.
------------------------------
Date: Sun, 22 Dec 2002 13:18:57 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: Perl2Exe - Missing modules in @INC?
Message-Id: <7qeb0vkh0elqmau75pglai2g7og1a98gd6@4ax.com>
Keywords: Remove WINDOZE to reply
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
In a fit of excitement on Sun, 22 Dec 2002 08:28:00 GMT, Bart Lateur
<bart.lateur@pandora.be> managed to scribble:
> Ian.H [dS] wrote:
>
> >The part that confuses me, is why does this run with no errors or
> >warnings as a script but not after compilation?
>
> BEcause @INC is different. You do have LWP::PRotocol::ftp at your
> disposal in @INC when run as a script, but not in the .exe. Why not?
> Only modules that are included *in* the executable are found.
>
> Perl2exe uses a limited static dependency checker, and it's typical
> that dynamically loaded modules are overlooked. It looks to me like
> that is the case here. Another typical example is with DBD drivers
> for DBI,
> because they're only referenced in the connect string.
>
> Apart from the plain "use", you could also try
>
> require LWP::Protocol::ftp if 0;
>
> which would have the same runtime behaviour as in the original
> script.
Thanks Bart.
I'm slowly understanding all this. I've only compiled a few simle
scripts before and none that required modules so all went to plan.
I'll work on this sometime soon and get it working.
Thanks again and Merry Xmas =)
Regards,
Ian
-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3
iQA/AwUBPgW7v2fqtj251CDhEQIfqgCeJnJdSgOKIGvD2vLfW9T/iWMqFYEAn2RI
GtxYAVCN1/u6fsJruK++IV19
=sefk
-----END PGP SIGNATURE-----
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Scripting, Web design, development & hosting.
------------------------------
Date: Sun, 22 Dec 2002 11:03:32 -0500
From: Kevin Michael Vail <kevin@vaildc.net>
Subject: Re: Perl2Exe - Missing modules in @INC?
Message-Id: <kevin-2D8150.11033222122002@vienna7.his.com>
In article <hhta0vkhhkm44kn9fbj98bae49u8hgrup5@4ax.com>,
Bart Lateur <bart.lateur@pandora.be> wrote:
> Ian.H [dS] wrote:
>
> >The part that confuses me, is why does this run with no errors or
> >warnings as a script but not after compilation?
>
> BEcause @INC is different. You do have LWP::PRotocol::ftp at your
> disposal in @INC when run as a script, but not in the .exe. Why not?
> Only modules that are included *in* the executable are found.
>
> Perl2exe uses a limited static dependency checker, and it's typical that
> dynamically loaded modules are overlooked. It looks to me like that is
> the case here. Another typical example is with DBD drivers for DBI,
> because they're only referenced in the connect string.
>
> Apart from the plain "use", you could also try
>
> require LWP::Protocol::ftp if 0;
>
> which would have the same runtime behaviour as in the original script.
For that matter, you can use
#perl2exe_include LWP::Protocol::ftp
which does the same thing.
The latest version of Perl2Exe seems to be more aggressive about finding
these things, so if you haven't upgraded in a while, you might want to
consider that.
--
Kevin Michael Vail | Dogbert: That's circular reasoning.
kevin@vaildc.net | Dilbert: I prefer to think of it as no loose ends.
http://www.vaildc.net/kevin/
------------------------------
Date: Sun, 22 Dec 2002 16:09:54 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: Perl2Exe - Missing modules in @INC?
Message-Id: <bqob0v8h58vg1akqans33um8tlp60nbtk4@4ax.com>
Keywords: Remove WINDOZE to reply
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
In a fit of excitement on Sun, 22 Dec 2002 11:03:32 -0500, Kevin
Michael Vail <kevin@vaildc.net> managed to scribble:
> > Apart from the plain "use", you could also try
> >
> > require LWP::Protocol::ftp if 0;
> >
> > which would have the same runtime behaviour as in the original
> > script.
>
> For that matter, you can use
>
> #perl2exe_include LWP::Protocol::ftp
>
> which does the same thing.
>
> The latest version of Perl2Exe seems to be more aggressive about
> finding these things, so if you haven't upgraded in a while, you
> might want to consider that.
Thanks Kevin.
I actually upgraded yesterday as I was still running 4.03 I think and
it failed to compile on a Perl 5.6.1 error as it was wanting 5.6.0 so
upgraded to 5.03 I think it is.
The script is definitely of use I think to many people running windoze
hence my reason for wanting to compile in the first place. Had it been
for my personal use only, I would leave it as a script.
Maybe windoze will come with Perl as default one day.. or maybe just
wishful thinking =)
Regards,
Ian
-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3
iQA/AwUBPgXj0Gfqtj251CDhEQLS2QCg7SLFO1pdGJVcmrSwX9gelt+rvVcAn2ty
0tCRJZP8FsS2+ZPRQHzwAMwQ
=u05t
-----END PGP SIGNATURE-----
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Scripting, Web design, development & hosting.
------------------------------
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 4303
***************************************