[15679] in Perl-Users-Digest
Perl-Users Digest, Issue: 3092 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 18 18:10:50 2000
Date: Thu, 18 May 2000 15:10:20 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <958687820-v9-i3092@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 18 May 2000 Volume: 9 Number: 3092
Today's topics:
Re: More Newbie Questions - Manipulating Data.... <lr@hpl.hp.com>
Re: need advice on strategy... <flavell@mail.cern.ch>
Re: Newbie Question - find command in Perl (Eric Dew)
Re: Perl & Frames <jhelman@wsb.com>
Re: Perl-5.06 Build Error <dan@tuatha.sidhe.org>
Re: perlcc and NT <rootbeer@redcat.com>
Re: PerlIS printing out header info. <flavell@mail.cern.ch>
Re: Proxy authentication solution CPAN module <rootbeer@redcat.com>
Re: Remove leading zero (Bart Lateur)
Re: simple newbie question <rootbeer@redcat.com>
Re: SOCKET Question <heinrich@chello.fr>
Re: split a list of number equally <Luc-Etienne.Brachotte@wanadoo.fr>
sub redefined? <talexb@tabsoft.on.ca>
Re: sub redefined? <jhelman@wsb.com>
Re: sub redefined? (brian d foy)
Re: sub redefined? <talexb@tabsoft.on.ca>
Re: sub redefined? <jhelman@wsb.com>
Re: sub redefined? <talexb@tabsoft.on.ca>
Re: sub redefined? <talexb@tabsoft.on.ca>
Re: sub redefined? <jhelman@wsb.com>
Re: Using OCX object (Reini Urban)
Re: What book on perl-cgi for a perl-programmer? (brian d foy)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 18 May 2000 14:52:12 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: More Newbie Questions - Manipulating Data....
Message-Id: <MPG.138e05df1e4785cb98aa98@nntp.hpl.hp.com>
In article <8g01ac$rq0$1@orpheus.gellyfish.com> on 18 May 2000 07:07:08
+0100, gellyfish@gellyfish.com says...
> On Wed, 17 May 2000 10:54:51 -0700 Mur wrote:
...
> > @digits = $n =~ /\d/g;
> >
> > This will set @digits to each match of the pattern in the string
> > $n. \d is a digit (0-9).
>
> No it wont. I think you mean :
>
> @digits = $n =~ /(\d)/g;
>
> The capturing brackets are important.
No, they aren't. From perlop:
... If there are no parentheses, it returns a list of all the matched
strings, as if there were parentheses around the whole pattern.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 18 May 2000 19:52:30 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: need advice on strategy...
Message-Id: <Pine.GHP.4.21.0005181951230.5629-100000@hpplus01.cern.ch>
On Thu, 18 May 2000, Tom Phoenix wrote:
> [...] if
> you really want to enforce something, apply the proper number of lawyers.
That's real sig-file material :-)
------------------------------
Date: 18 May 2000 21:54:42 GMT
From: edew@netcom.com (Eric Dew)
Subject: Re: Newbie Question - find command in Perl
Message-Id: <8g1or2$k5d$1@slb6.atl.mindspring.net>
In article <8fv50q$45i$1@slb6.atl.mindspring.net>,
Kevin Bass <akil1@mindspring.com> wrote:
>How does the following Unix command translate into Perl:
>
>find . -name 'samp*' -exec <command>
>
>Kevin
>
>
Try find2perl . -name 'samp*' -exec <command>
to get something like:
#!/usr/local/bin/perl
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
require "find.pl";
# Traverse desired filesystems
&find('.');
exit; # You'll need to remove this from your script unless all you want
# to do is this find.
sun wanted {
/^samp.*$/ &&
(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
&exec(0,'<command>');
}
sub exec {
local($ok,@cmd) = @_;
foreach $word (@cmd) {
$word =~ s|{}|$name|g;
}
if ($ok) {
local($old) = select(STDOUT);
$| = 1;
print "@cmd";
select($old);
return 0 unless <STDIN> =~ /^y/;
}
chdir $cwd;
system @cmd;
chdir $dir;
return !$?;
}
EDEW
------------------------------
Date: Thu, 18 May 2000 19:11:03 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: Perl & Frames
Message-Id: <3924406A.3748808E@wsb.com>
This is actually an HTML/CGI question that has nothing to do with perl.
You need to update the link that calls the script and add a
TARGET="_top" to the <A> tag.
JH
Richard wrote:
>
> I have a web page that calls a Perl script within a frame which is part of a
> Frameset. When this Perl script is called it writes some HTML which I want
> to become the Parent page and overwrite the Frameset.....problem is that
> currently it's just re-writing in the frame!!
>
> Can anyone suggest how I can make the HTML written by this script overwrite
> the Frames and become the parent page!!
>
> Hope that makes sense!
>
> Thanks,
>
> Richard
>
> P.S. Sorry it's not a truly Perl question as such for this newsgroup.
--
----------------------------------------------------------------
Jeff Helman Product Manager -- Internet Services
jhelman@wsb.com CCH Washington Service Bureau
----------------------------------------------------------------
99 little bugs in the code, 99 bugs in the code.
Fix one bug, compile again, 100 little bugs in the code.
100 little bugs in the code, 100 bugs in the code.
Fix one bug, compile again, 101 little bugs in the code...
----------------------------------------------------------------
------------------------------
Date: Thu, 18 May 2000 19:02:27 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl-5.06 Build Error
Message-Id: <77XU4.87369$hT2.368937@news1.rdc1.ct.home.com>
bijua@my-deja.com wrote:
Hmmm. I'll try this again, with content...
> perl.c:169: incompatible type for argument 2 of
> `pthread_mutex_init'
This is generally an indicator that your version of the OS provides an
older version of the POSIX threading interface than the one perl assumes
by default. Perl uses the released version of POSIX threads, while many
older versions of OSes provide an interface that matches the POSIX draft 4
version. POSIX, for some reason (that probably includes hallucenagenic
substances), made the final release version almost but not quite
compatible with the drafts. (Which is to say the function names are the
same, but arguments differ)
Read README.threads and see what it says you need to do to use the old
pthread API. Alternatey you can upgrade to a version of HP/UX that
provides the final version. (Odds are if you're using a version old enough
to not provide it, then you're using a version with bugs in its thread
libraries)
Dan
------------------------------
Date: Thu, 18 May 2000 14:56:47 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: perlcc and NT
Message-Id: <Pine.GSO.4.10.10005181453360.25459-100000@user2.teleport.com>
On Thu, 18 May 2000, Derek Chaloner wrote:
> Some simple perl scripts can be converted into executable files but others
> (like that shown below) fail and require a CTRL C to terminate.
Until perlcc is finished, don't compile your programs. Compiling doesn't
make your programs safer, faster, cooler, more secure, easier to read,
easier to write, easier to debug, or easier to maintain, but it can make
them bigger. :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 18 May 2000 19:48:03 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: PerlIS printing out header info.
Message-Id: <Pine.GHP.4.21.0005181929480.5629-100000@hpplus01.cern.ch>
On Thu, 18 May 2000, Steve stood usenet on its head and surprised us
all when this popped out:
> It is HTTP headers put they actually print out like text on the wb
> page? How can I hide this??
Please, quote the specific parts of the previous discussion that
are relevant to your comment, and then place your comment below,
deleting all extraneous material, in accordance with long-standing
usent custom.
It appears that you are trying to execute a CGI script.
CGI issues are very on-topic for comp.infosystems.www.authoring.cgi,
while server-specific issues would be appropriate on the
comp.infosystems.www.servers.* group relevant to the OS that you use
(in this case ms-windows); and thus are generally felt to be off-topic
here. You have already been told this, though perhaps in a somewhat
indirect fashion. In future I would urge you to seek out the more
relevant group.
The response from a CGI script consists of a CGI header part (from
which the server will compose appropriate HTTP response headers to
send to the client), terminated by an empty record and usually
followed by a content body, which the client will either render (if
it's a content type, such as HTML, which the client is configured to
render) or offer to save to disk.
If you are seeing what appear to be HTTP headers being rendered, then
those headers were probably sent as part of the content body. Far
from trying to "hide" them, you want to find out why they were being
sent in the wrong place, because they surely won't be achieving any
useful purpose (i.e as HTTP headers) when they're in the wrong place.
[f'up suggested]
Incidentally, working with Win32 Apache will give you a much more
portable skillset than messing around with a Windows-specific web
server.
------------------------------
Date: Thu, 18 May 2000 14:59:08 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Proxy authentication solution CPAN module
Message-Id: <Pine.GSO.4.10.10005181457080.25459-100000@user2.teleport.com>
On Thu, 18 May 2000, Myself wrote:
> After playing for a day or so I have got my Perl on Solaris to speak
> through an authenticating proxy. Can't guarenttee if this is the best
> solution or will always work but it seems to for me.
> 1)Edit UserAgent.pm in the LWP module in sub mirror (around line 555)
I don't know whether this should or should not be changed - but if it
should, it should be made in the LWP sources. Have you sent a patch to the
LWP mailing list yet? (The address is in the LWP manpage.)
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 18 May 2000 21:33:34 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Remove leading zero
Message-Id: <392760d4.50640026@news.skynet.be>
nobull@mail.com wrote:
>See FAQ: "How do I strip blank space from the beginning/end of a string?"
>
>Make the obvious adjustments.
It's not so obvious. You need to keep at least one digit. "00" must
become "0", not "".
s/^0+(?=\d)//;
Other suggested methods include
$_ += 0;
but only if the precision for numerics in Per lis heigh enough to keep
all significant digits for your numbers.
--
Bart.
------------------------------
Date: Thu, 18 May 2000 14:50:57 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: simple newbie question
Message-Id: <Pine.GSO.4.10.10005181448090.25459-100000@user2.teleport.com>
On Thu, 18 May 2000, Andre [iso-8859-1] Bättig wrote:
> Subject: simple newbie question
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
> I just started to learn Perl with a book.
I hope it's a good book! :-)
> But now to print out to the browser nothing is happening with this 2
> files.
When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.
http://www.perl.com/CPAN/
http://www.cpan.org/
http://www.cpan.org/doc/FAQs/cgi/idiots-guide.html
http://www.cpan.org/doc/manual/html/pod/
> read(STDIN, $Daten, $ENV{'CONTENT_TYPE'});
Should really use the CGI module. So throw out your book. :-)
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 18 May 2000 21:06:13 GMT
From: Gregory Heinrich <heinrich@chello.fr>
Subject: Re: SOCKET Question
Message-Id: <39245D35.87189FB5@chello.fr>
This is because your operating system uses a cache to send data and waits
before sending any. The OS waits for the buffer to be x KBytes long and
then sends the whole packet.
To disable caching, just select your socket stream and set $| to 1 :
$a = select SOCKET_STREAM;
$| = 1;
That should work (unless I made a syntax error).
Greg.
Syed Hussain wrote:
> Hello,
>
> I am having a problem with SOCKET. I am trying to establish a
> connection
> with port 5002 which is a telnet port and send command to it. It is not
> a
> shell comand its an command interpreter.
>
> I am able to open up the socket and send the command. I am also able to
> receive part of the response but after that it just hangs up. I think
> that
> the problem is that after i read the last block it goes back in the recv
> operation and then hangs up since there is not data.
>
> I also tried using Net::Telnet but am not able to send any commands as
> the
> commands sent are only for shell operations.
>
> I hope that someone can help me with this question.
>
> Thanks.
>
> ---Jawwad
>
> use strict;
> use IO::Socket;
> my ($remote,$port, $iaddr, $paddr, $proto, $line,$sock);
>
> $remote = shift || '137.168.72.27';
> $port = shift || 5002; # random port
>
> $sock = IO::Socket::INET->new(Proto => 'tcp',PeerPort => $port,
> PeerAddr
> =>
> $remote);
> $sock->send($msg) || die "send: $!";
> my $MAXLEN = 1024;
> while ($flag){
> print "before flag\n";
> $flag = defined($sock->recv($block, $MAXLEN)) ;
> chomp($block);
> if ($block =~ m/=>/) {
> exit;
> return;
> }
> if ($block =~ m/\?>/) {
> print "I don't understand that message.\n";
> exit;
> return;
> }
> print "$block\n";
> }
------------------------------
Date: Thu, 18 May 2000 22:11:02 +0200
From: Luc-Etienne Brachotte <Luc-Etienne.Brachotte@wanadoo.fr>
Subject: Re: split a list of number equally
Message-Id: <39244E56.6F5712ED@wanadoo.fr>
Don Byington a écrit :
> Does anyone have any Perl 5 code for spliltting a list of numbers into
> two or more lists, where the new lists have a sum that is as close as
> possible?
If you have already the list, the algorithm would be
1) sum all the numbers (if you don't have already the sum)
If you have all numbers in @list
$sum=0;
@sum=();
$#sum=$#list;
$item=0;
foreach (@list)
{
$sum+=$_;
$sum[$item++]=$sum;
}
2) use @sum to know where the list is as close as posible to $sum/2
you can use the dicotomic algorithm to speed up the process
Surely some of use know a quicker algorithm, but that is the idea.
LEB
------------------------------
Date: Thu, 18 May 2000 19:35:35 GMT
From: T. Alex Beamish <talexb@tabsoft.on.ca>
Subject: sub redefined?
Message-Id: <2ah8iskb0tnkl62trjtnocnrjbijotmcol@4ax.com>
Hello all,
I have searched the man pages for more information on this one and
have come up empty-handed. No help on the perl.com site FAQ either.
The error I get when compiling one of my mod_perl modules is
Subroutine main redefined at compare.pm line 16 (#1)
(W) You redefined a subroutine. To suppress this warning, say
{
local $^W = 0;
eval "sub name { ... }";
}
Why does it say I redefined the subroutine? The only thing I have from
lines 1-15 are the package statement and three my statements, each
with a list of variable names. no other definitions.
Yes, the module does actually compile 'OK' according to perl, but I
really love it when perl compiles 'OK' and there aren't any messages
at all. My original background is C, and I was a big fan of lint. Once
it compiles and lints cleanly and you've watched the code in the
debugger, you're pretty darn sure that things are gonna behave. So
this is kind of driving me nuts. Help would be appreciated.
Thanks.
------------------------------
Date: Thu, 18 May 2000 19:39:12 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: sub redefined?
Message-Id: <39244702.A0BD3C7A@wsb.com>
Please post the first 20 or so lines of code. That will help greatly.
JH
----------------------------------------------------------------
Jeff Helman Product Manager -- Internet Services
jhelman@wsb.com CCH Washington Service Bureau
----------------------------------------------------------------
"T. Alex Beamish" wrote:
>
> Hello all,
>
> I have searched the man pages for more information on this one and
> have come up empty-handed. No help on the perl.com site FAQ either.
>
> The error I get when compiling one of my mod_perl modules is
>
> Subroutine main redefined at compare.pm line 16 (#1)
>
> (W) You redefined a subroutine. To suppress this warning, say
>
> {
> local $^W = 0;
> eval "sub name { ... }";
> }
>
> Why does it say I redefined the subroutine? The only thing I have from
> lines 1-15 are the package statement and three my statements, each
> with a list of variable names. no other definitions.
>
> Yes, the module does actually compile 'OK' according to perl, but I
> really love it when perl compiles 'OK' and there aren't any messages
> at all. My original background is C, and I was a big fan of lint. Once
> it compiles and lints cleanly and you've watched the code in the
> debugger, you're pretty darn sure that things are gonna behave. So
> this is kind of driving me nuts. Help would be appreciated.
>
> Thanks.
------------------------------
Date: Thu, 18 May 2000 15:46:13 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: sub redefined?
Message-Id: <brian-1805001546180001@47.atlanta-21-22rs.ga.dial-access.att.net>
In article <2ah8iskb0tnkl62trjtnocnrjbijotmcol@4ax.com>, T. Alex Beamish <talexb@tabsoft.on.ca> wrote:
>The error I get when compiling one of my mod_perl modules is
*danger* will robinson!
>Subroutine main redefined at compare.pm line 16 (#1)
>
> (W) You redefined a subroutine. To suppress this warning, say
>Why does it say I redefined the subroutine? The only thing I have from
>lines 1-15 are the package statement and three my statements, each
>with a list of variable names. no other definitions.
this is mod_perl. your script becomes a subroutine in a larger
world. see the mod_perl docs for information on this sort of thing.
--
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ
<URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 18 May 2000 19:49:48 GMT
From: T. Alex Beamish <talexb@tabsoft.on.ca>
Subject: Re: sub redefined?
Message-Id: <vfi8is815j6t66jna1vf5cad1ldp6op9bo@4ax.com>
On Thu, 18 May 2000 19:39:12 GMT, Jeff Helman <jhelman@wsb.com> wrote:
>Please post the first 20 or so lines of code. That will help greatly.
>JH
>
>----------------------------------------------------------------
>Jeff Helman Product Manager -- Internet Services
>jhelman@wsb.com CCH Washington Service Bureau
>----------------------------------------------------------------
>
>"T. Alex Beamish" wrote:
>>
>> Hello all,
>>
>> I have searched the man pages for more information on this one and
>> have come up empty-handed. No help on the perl.com site FAQ either.
>>
>> The error I get when compiling one of my mod_perl modules is
>>
>> Subroutine main redefined at compare.pm line 16 (#1)
>>
>> (W) You redefined a subroutine. To suppress this warning, say
>>
>> {
>> local $^W = 0;
>> eval "sub name { ... }";
>> }
>>
>> Why does it say I redefined the subroutine? The only thing I have from
>> lines 1-15 are the package statement and three my statements, each
>> with a list of variable names. no other definitions.
>>
>> Yes, the module does actually compile 'OK' according to perl, but I
>> really love it when perl compiles 'OK' and there aren't any messages
>> at all. My original background is C, and I was a big fan of lint. Once
>> it compiles and lints cleanly and you've watched the code in the
>> debugger, you're pretty darn sure that things are gonna behave. So
>> this is kind of driving me nuts. Help would be appreciated.
>>
>> Thanks.
#
#
#
#
#
#
#
#
#
#
#
package compare;
my ( $compare_no, %IN, @sname, @off, $retrieve, $start, $end );
my ( $period, $quarters, $years, $upperbound, $lowerbound );
my ( @query, @max_min_sth, @yquery, @sth, @ysth, @numrows );
sub main {
use query_header;
use results;
#see Apache::Registry
use strict;
use diagnostics;
------------------------------
Date: Thu, 18 May 2000 20:00:51 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: sub redefined?
Message-Id: <39244C13.C7018338@wsb.com>
Oops. Totally missed that. 'Course, after seeing the following code...
{SNIP}
sub main {
use query_header;
use results;
{SNIP}
I wonder if perhaps one of these two objects is exporting main and
causing the subroutine declaration to whine.
On another note, even though it technically doesn't matter, I think most
people would agree with me that it is more aesthetically pleasing to put
your "use ..." statements up at the top of the file since they execute
first anyway.
Hope this helps.
JH
brian d foy wrote:
>
> In article <2ah8iskb0tnkl62trjtnocnrjbijotmcol@4ax.com>, T. Alex Beamish <talexb@tabsoft.on.ca> wrote:
>
> >The error I get when compiling one of my mod_perl modules is
>
> *danger* will robinson!
>
> >Subroutine main redefined at compare.pm line 16 (#1)
> >
> > (W) You redefined a subroutine. To suppress this warning, say
>
> >Why does it say I redefined the subroutine? The only thing I have from
> >lines 1-15 are the package statement and three my statements, each
> >with a list of variable names. no other definitions.
>
> this is mod_perl. your script becomes a subroutine in a larger
> world. see the mod_perl docs for information on this sort of thing.
>
> --
> brian d foy
> Perl Mongers <URI:http://www.perl.org>
> CGI MetaFAQ
> <URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 18 May 2000 20:24:16 GMT
From: T. Alex Beamish <talexb@tabsoft.on.ca>
Subject: Re: sub redefined?
Message-Id: <6bk8iscvk04au1acg7kspedfuq6k8v3d2k@4ax.com>
On Thu, 18 May 2000 20:00:51 GMT, Jeff Helman <jhelman@wsb.com> wrote:
>Oops. Totally missed that. 'Course, after seeing the following code...
>
>{SNIP}
>sub main {
>
>use query_header;
>use results;
>{SNIP}
>
>I wonder if perhaps one of these two objects is exporting main and
>causing the subroutine declaration to whine.
I don't believe that they are exporting main. No one is calling anyone
else by just main() -- they're all query_header::main() and so forth.
>On another note, even though it technically doesn't matter, I think most
>people would agree with me that it is more aesthetically pleasing to put
>your "use ..." statements up at the top of the file since they execute
>first anyway.
I agree 100% but I've been getting a little frantic trying to get the
perl compiler to shut up so I've been moving things around. Normally I
put things in the following order *in code that I write*, but ...
package ..
use ..
my .. # Globals, yech, use them as little as possible.
sub main
{
}
1;
with really ugly legacy code I prefer to tinker as little as possible.
The good news is that I believe the project manager knows that it's
poor quality code, so perhaps we'll get a chance to rewrite it soon.
I'll try re-ordering the statements again, putting the use statements
where they belong. Or where I think they belong (he said, not wanting
to start a flame war).
Alex
------------------------------
Date: Thu, 18 May 2000 20:38:14 GMT
From: T. Alex Beamish <talexb@tabsoft.on.ca>
Subject: Re: sub redefined?
Message-Id: <rbl8issjavrdvqt8l8en6j9uis5jt5feun@4ax.com>
On Thu, 18 May 2000 20:00:51 GMT, Jeff Helman <jhelman@wsb.com> wrote:
>Oops. Totally missed that. 'Course, after seeing the following code...
>
>{SNIP}
>sub main {
>
>use query_header;
>use results;
>{SNIP}
>
>I wonder if perhaps one of these two objects is exporting main and
>causing the subroutine declaration to whine.
Odder.
Now I've tried doing
use results qw ( ccomp_no );
to limit just that subroutine being imported, and I still get the same
result. I dunno.
------------------------------
Date: Thu, 18 May 2000 20:50:17 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: sub redefined?
Message-Id: <392457A9.BE9450BB@wsb.com>
Okay, let me ask this...In your two imported modules (query_header and
results), are there package declarations in both? What I'm wondering is
if one of these legacy files is polluting the main package's namespace.
Here's a test. Try running this:
------- CUT HERE -------
## VAR DECLARATION LINES
sub main {
## SOMETHING/NOTHING/WHATEVER
}
require query_header;
require results;
------- CUT HERE -------
If I'm correct, the warning you get from perl -w will point to some code
in one of these legacy modules. I'm betting that in one of those two
beasts, there is either an export of main, or a main subroutine is being
defined in the main package.
Hope this works. I sympathize with wanting to get perl -w to shut the
heck up. :)
JH
"T. Alex Beamish" wrote:
>
> On Thu, 18 May 2000 20:00:51 GMT, Jeff Helman <jhelman@wsb.com> wrote:
>
> >Oops. Totally missed that. 'Course, after seeing the following code...
> >
> >{SNIP}
> >sub main {
> >
> >use query_header;
> >use results;
> >{SNIP}
> >
> >I wonder if perhaps one of these two objects is exporting main and
> >causing the subroutine declaration to whine.
>
> Odder.
>
> Now I've tried doing
>
> use results qw ( ccomp_no );
>
> to limit just that subroutine being imported, and I still get the same
> result. I dunno.
----------------------------------------------------------------
Jeff Helman Product Manager -- Internet Services
jhelman@wsb.com CCH Washington Service Bureau
----------------------------------------------------------------
99 little bugs in the code, 99 bugs in the code.
Fix one bug, compile again, 100 little bugs in the code.
100 little bugs in the code, 100 bugs in the code.
Fix one bug, compile again, 101 little bugs in the code...
----------------------------------------------------------------
------------------------------
Date: Thu, 18 May 2000 19:33:11 GMT
From: rurban@x-ray.at (Reini Urban)
Subject: Re: Using OCX object
Message-Id: <392446de.32725176@judy>
MagicDRD wrote:
>I am trying to write a Perl script that will use
>functions/methods in an existing OCX object.
Win32::OLE
--
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html
------------------------------
Date: Thu, 18 May 2000 15:41:14 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: What book on perl-cgi for a perl-programmer?
Message-Id: <brian-1805001541150001@47.atlanta-21-22rs.ga.dial-access.att.net>
In article <392512f5.146459181@news.firstworld.net>, efinley@efinley.com wrote:
>On 18 May 2000 07:23:48 -0700, merlyn@stonehenge.com (Randal L.
>Schwartz) wrote:
>>Most books won't pass this test. That leaves darn few books. If it
>>makes it past those, you probably have a reasonably modern book with a
>>reasonably clued-in author.
>Are there any books that actually make it past all those restrictions?
so far i think all CGI books are pretty bad, and i haven't been
properly tempted to fix this. ;)
--
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ
<URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 3092
**************************************