[22352] in Perl-Users-Digest
Perl-Users Digest, Issue: 4573 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 16 14:05:38 2003
Date: Sun, 16 Feb 2003 11:05:06 -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, 16 Feb 2003 Volume: 10 Number: 4573
Today's topics:
Re: (not 1) and (!1) yield zero length string <dont@want.spam>
Re: Bug in Net::FTP - ls() command doesn't work <eric.ehlers@btopenworld.com.nospam>
Re: DBI seg fault <spamtrap@nowhere.com>
join or .= -- which is faster? <jsmoriss@mvlan.net>
Re: join or .= -- which is faster? <nobull@mail.com>
Re: New JAPH <mpapec@yahoo.com>
Re: Perl dies silently. (Anno Siegel)
Re: program contol <d.borland@ntlworld.com>
Re: Retrieving Network Shares <nobull@mail.com>
Re: undef true|false <nobull@mail.com>
Re: undef true|false <nobull@mail.com>
Re: undef true|false (Tad McClellan)
Re: use lib Apache->server_root_relative('lib/perl'); <Pop@goesthe.net>
Re: use lib Apache->server_root_relative('lib/perl'); <randy@theoryx5.uwinnipeg.ca>
Re: use lib Apache->server_root_relative('lib/perl'); <flavell@mail.cern.ch>
Re: use lib Apache->server_root_relative('lib/perl'); <flavell@mail.cern.ch>
Re: use lib Apache->server_root_relative('lib/perl'); <Pop@goesthe.net>
Re: use lib Apache->server_root_relative('lib/perl'); <Pop@goesthe.net>
Re: Win32::NetResource::GetSharedResources <nobull@mail.com>
Re: Win32::NetResource::GetSharedResources <sapbasis2003@netscape.net>
Re: Win32::NetResource::GetSharedResources (Tad McClellan)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 16 Feb 2003 18:52:33 +0000
From: Chris Lowth <dont@want.spam>
Subject: Re: (not 1) and (!1) yield zero length string
Message-Id: <QfR3a.222$iz6.113@newsfep3-gui.server.ntli.net>
parv wrote:
> I am mystified that (not 1 ...) & (!1 ...) yield _zero_length_string_
> but not the following operations...
>
> (!0 && 0) , (!0 and 0) , (not 0 && 0) , (not 0 and 0)
>
>
> ...which produce 0, 0, 1, 0 respectively.
>
> The perlop (perl 5.6.1) states that qw{and && or ||} operators return
> the last value evaluated.
>
> So, does (not 1) or (!1) change/short-circuit to 0 which is false
> value, and empty string is a false value, which is then returned?
>
> But isn't 1 the value being evaluated which should be returned,
> though very odd & unexpected, according to the perlop? In case
> perlop is referring to the value of "not 1", then there is ambiguity
> there, IMO.
No - no ambiguity.
In perl the values zero and empty string are both understood to be "FALSE"
when used as booleans. Anything else is TRUE.
so: print ( 2 == 2 );
prints 1 (means: TRUE)
and: print ( 2 == 1 );
prints nothing (means: FALSE)
Further: a non-numeric string is taken to mean zero when used in a nuermic
context.
So: print "yes" + 1;
prints 1
and: print (2 == 3) + 1;
prints 1 because (2 == 3) returns FALSE - which is actually an empty string,
and ("" + 1) is eqivalent to (0 + 1) which is 1.
Next, you must consider operator presedence. "&&" and "!" are the same
level, and "not" and "and" are at a different (lower) level -- so.
(!0 && 0) is ((!0) && 0) = 0 (! and && are the same)
(!0 and 0) is ((!0) and 0) = 0 (! done before "and")
(not 0 && 0) is (not (0 && 0)) = 1 (&& done before "not")
(not 0 and 0) is ((not 0) and 0) = 0 ("not" and "and" are the same)
The answer is -
- always bracket stuff up for clarity
- dont mix !,&&,|| with not,and,or if possible
- dont assume that booleans are numbers (perl isnt C)
that way you and perl can agree on love, the universe and the meaning of
life.
Chris
--
My real e-mail address is
chris <at> lowth <dot> com
------------------------------
Date: Sun, 16 Feb 2003 17:28:26 +0000 (UTC)
From: "eric" <eric.ehlers@btopenworld.com.nospam>
Subject: Re: Bug in Net::FTP - ls() command doesn't work
Message-Id: <b2ohno$i36$1@knossos.btinternet.com>
"Mark McKay" <mark@kitfox.com> wrote in message
news:52de739f.0302160045.7b2070c@posting.google.com...
> I'm having some trouble with porting some code that uses the Net::FTP
> package from Windows to Linux. On Linux, I'm using the libnet-1.12
> module, while for Windows I'm using ActiveState with Net::FTP
> installed using the Perl Package Manager.
? Net::FTP comes standard with ActiveState.
> Anyhow, the following works on windows, but not on Linux. The
> FTP::ls() returns empty for some reason, even though the directory
> exists and is not empty:
i suggest the changes below (untested) - run Net::FTP with debugging on, and
check for errors after every command. i suggest running this code on both
linux and windows and comparing the debugging output, the problem should be
obvious after that.
use strict;
use warnings;
> #Connect to server
> print "Connecting to server\n";
> my $ftp = Net::FTP->new("ftp.mydomain.com", Debug => 0);
my $ftp = Net::FTP->new("ftp.mydomain.com", Debug => 1) or die "can't create
ftp object, error is $@";
> print "Connection established\n";
> $ftp->login("mylogin","password");
$ftp->login("mylogin","password") or die "can't log in";
> print "Logged in\n";
> $ftp->cwd("/public_html/comics");
$ftp->cwd("/public_html/comics") or die "can't cwd";
> my $dir = $ftp->pwd();
my $dir = $ftp->pwd() or die "pwd command failed";
> print "Switched to directory $dir\n";
> @comicFiles = $ftp->ls();
my @comicFiles = $ftp->ls();
> print "Filelist:\n@comicFiles\n";
> Any help would be appreciated.
>
> Mark McKay
HTH,
-eric
------------------------------
Date: Sun, 16 Feb 2003 16:28:44 GMT
From: Andrew Lee <spamtrap@nowhere.com>
Subject: Re: DBI seg fault
Message-Id: <otev4vs1k20q5qdsmd4996hs2fkkslhr9t@4ax.com>
On 15 Feb 2003 15:39:23 -0800, smittod@auburn.edu (Todd Smith) wrote:
>I'm using this test script (that i found from another post inthis
>group) and a username/password that works whe connecting to mysql from
>the command line.
>
libmysql.so may be puking.
Did you compile it or install a binary version?
------------------------------
Date: Sun, 16 Feb 2003 15:40:31 GMT
From: Jean-Sebastien Morisset <jsmoriss@mvlan.net>
Subject: join or .= -- which is faster?
Message-Id: <slrnb4vc7g.gku.jsmoriss@zaphod.lan11.localdomain>
Which is faster:
$var = join('', $var, "something");
or
$var .= "something";
I have to join some large strings, but also a lot of small strings in a
while loop (reading the contents of a file into a string). I'd like to
optimize my code for speed, so figured using "join" might be a ittle
faster.
Thanks,
js.
--
Jean-Sebastien Morisset, Sr. UNIX Administrator <jsmoriss@mvlan.net>
Personal Home Page <http://jsmoriss.mvlan.net:8080/>
"With sufficient thrust, pigs fly just fine." -- RFC 1925
------------------------------
Date: 16 Feb 2003 16:38:47 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: join or .= -- which is faster?
Message-Id: <u9heb4rxig.fsf@wcl-l.bham.ac.uk>
Jean-Sebastien Morisset <jsmoriss@mvlan.net> writes:
> Which is faster:
perldoc Benchmark
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Sun, 16 Feb 2003 15:51:29 +0100
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: New JAPH
Message-Id: <qa9v4vokuld4ir9tqpp4uvd0kj13pdeotu@4ax.com>
simpler one,
$_=$2,
$_.=$1
,s s g
s sgxg
,print
,while
q muJ
tsagon
htrePg
reglah
kcreg!
=m=~m~
(.{1})
(.)~xg
..I guess 5 chars per row should be the limit(or not?)
--
Matija
------------------------------
Date: 16 Feb 2003 17:26:57 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Perl dies silently.
Message-Id: <b2ohl1$5ho$1@mamenchi.zrz.TU-Berlin.DE>
Tassilo v. Parseval <tassilo.parseval@post.rwth-aachen.de> wrote in comp.lang.perl.misc:
[...]
> sub $SIG{ __DIE__ } = sub {
> open my $h, ">>", "fatal.log"
> or die...; # err, a little odd in a __DIE__ handler
Not at all. Perl is prepared for the situation and suspends the
__DIE__ handler while it is executing it. So the inner die() actually
dies. __WARN__ is similar.
Anno
------------------------------
Date: Sun, 16 Feb 2003 12:52:03 -0000
From: "d.borland" <d.borland@ntlworld.com>
Subject: Re: program contol
Message-Id: <scQ3a.109$44.140281@newsfep2-gui>
Hi, thanks.
I have tried this means:
open(PROGHANDLE, "| programname")
but this only gives me input then and i need to catch it's output aswell.
I use the script to open the program, then catch it's output, then the
program will wait for input <<-- This is where my problem lies.
I cannot open the program for input and output and this is what i need to
do.
Hope you can help.
Thanks
';'
"Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de> wrote in
message news:b2nut0$mdn$1@nets3.rz.RWTH-Aachen.DE...
> Also sprach d.borland:
>
> > I am currently trying to write a script which will execute a program on
the
> > users system and then pass data to the program. That's all i want.
> >
> > I have got as far as opening the program using the snippet of code
below,
> > but when i try to pass any data to it i get nothing, could anyone help
me
> > out here?
> >
> > code for opening program:
> > open(PROGHANDLE, "programname |");
> >
> > code to pass data to program, which doesn't work:
> > print PROGHANDLE "data to send";
>
> You are opening a pipe from the program to your script. If you want to
> send data to it, that's the wrong way around. Therefore:
>
> open PROGHANDLE, "| programname" or die $!;
> print PROGHANDLE "data to send";
> close PROGHANDLE;
>
> Also notice the "or die $!"-part that should never miss when you do
> system-calls. They can go wrong in a lot of ways and $! tells you the
> reason when this happens.
>
> Tassilo
> --
>
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
>
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
>
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: 16 Feb 2003 15:51:09 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Retrieving Network Shares
Message-Id: <u9y94grzpu.fsf@wcl-l.bham.ac.uk>
Giovanni Davila <sapbasis2003@netscape.net> writes:
> I cannot retrieve the shares from a server.
> The following is the code I have:
>
> $c_comp=0;
> use Win32::NetResource;
> if (Win32::NetResource::GetSharedResources(\@Resources,
> RESOURCETYPE_ANY, "MYSERVER"))
> {
> map
> {
> $c_comp++;
> print "$_\n";
> }
> @Resources;
> }
>
> Does anybody know what the problem is with the code?
At first glance:
Doesn't use strict.
Doesnt' use warnings.
Uses map in a void context.
And that's without even considering what it's supposed to do or what
Win32::NetResource::GetSharedResources() is supposed to do or what
happens when you run the code or why you think whatever happens is
wrong.
Having looked at the documentation
for Win32::NetResource::GetSharedResources some questions string to
mind:
Why are you calling a two argument function with three arguments (or
do I have an older version of Win32::NetResource - I can't tell you
didn't say what version you are using)?
Why are you printing out $_ when in contains a hashref? The string
representation of a hasref is not very interesting.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 16 Feb 2003 15:56:44 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: undef true|false
Message-Id: <u9u1f4rzgj.fsf@wcl-l.bham.ac.uk>
spamthemuse@yahoo.com (Hunch) writes:
> "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de> wrote in message news:<b2mgev$qda$1@nets3.rz.RWTH-Aachen.DE>...
> > Also sprach Hunch:
> >
> > > $hash->{'tmp'} = "hello";
> if ($hash->{'tmp'} == undef) {
FYI: "hello" == undef is true.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 16 Feb 2003 15:59:02 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: undef true|false
Message-Id: <u9ptpsrzcp.fsf@wcl-l.bham.ac.uk>
spamthemuse@yahoo.com (Hunch) writes:
> $hash->{'tmp'} = "hello";
> $hash->{'tmp'} = undef;
> if ($hash->{'tmp'}) {
> print "yes\n";
> }
> else {
> print "no\n";
> }
>
> On my linux box it returns "no". Taking the code over to a solaris
> box it returns "yes".
Are you copying the code or are you retyping it?
Perhaps there's a transcrition error.
Make sure you always have strictures and warnings enabled. They tend
to pick up simple typos quite well.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Sun, 16 Feb 2003 11:42:56 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: undef true|false
Message-Id: <slrnb4vjd0.fu4.tadmc@magna.augustmail.com>
Hunch <spamthemuse@yahoo.com> wrote:
> if ($hash->{'tmp'} == undef) {
You are using the wrong operator.
You use the defined() function to test for definedness:
if ( defined $hash->{'tmp'} ) {
or
unless ( defined $hash->{'tmp'} ) {
as appropriate to whatever logic it is that you want.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 16 Feb 2003 14:33:01 GMT
From: "Papa Oohmawmaw" <Pop@goesthe.net>
Subject: Re: use lib Apache->server_root_relative('lib/perl');
Message-Id: <xiN3a.124436$SD6.6684@sccrnsc03>
Tassilly, I'll post the answer when I start looking for it. See how much
control you have over that.
"Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de> wrote in
message news:b2o0tn$o6p$1@nets3.rz.RWTH-Aachen.DE...
> Also sprach Papa Oohmawmaw:
>
> > I have posted a lot to newsgroups (for years), have never read a FAQ and
> > have no intention of EVER doing so. It never ceases to amaze me why some
> > people want to point out about cross posting (which I did not do). Go to
a
> > moderated group of your own so you have total control if things aren't
to
> > your liking.
>
> If you like it or not, the regulars (ie. those that do follow the
> conventions here) have some sort of control over this group because
> those are the ones you are likely to get help from, if any. The nitwits,
> that is people like you who publically declare how much they don't care
> about any rules, lack the experience and knowledge to give help (they
> have an unmatched competence in trolling though, oddly enough). Those
> are only the wanna-be consumers but the regulars in here generally take
> good care that there's not too much they can consume (save for a smack
> on the head).
>
> So either you learn some manners (your parents haven't done their duty
> quite right, eh?) or you tread off. Either way, there's not much to
> harvest here for you any longer.
>
> Tassilo
> --
>
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
>
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
>
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: Sun, 16 Feb 2003 09:12:21 -0600
From: "Randy Kobes" <randy@theoryx5.uwinnipeg.ca>
Subject: Re: use lib Apache->server_root_relative('lib/perl');
Message-Id: <mTN3a.44150$7_.191635@news1.mts.net>
"Papa Oohmawmaw" <Pop@goesthe.net>
wrote in message news:veB3a.117585$iG3.14669@sccrnsc02...
> 1) Can someone tell me where the line below (a) is pointing to? It's from
my
> startup.pl file. I'm wanting it to go to "/home/perl_apache/lib/perl/."
> a) use lib Apache->server_root_relative('lib/perl');
> 2) The startup.pl file is at this address (b)
> b) /home/perl_apache/lib/perl/startup.pl
> 3) My httpd.conf is at this address (c)
> c) /opt/apache/conf/httpd.conf
> Here's the error message I'm getting when trying to start Apache (d).
>
> d) [root@ensim Apache2]# /opt/apache/bin/apachectl start
> [error] Can't locate object method "server_root_relative" via package
> "Apache" at /home/perl_apache/lib/perl/startup.pl line 5.
> BEGIN failed--compilation aborted at /home/perl_apache/lib/perl/startup.pl
> line 5.
> Compilation failed in require at (eval 1) line 1.
>
> [Sat Feb 15 18:37:35 2003] [error] Can't load Perl file:
> /home/perl_apache/lib/perl/startup.pl for server ensim.rackshack.net:0,
> exiting...
You'd do well to take the advice of the other replies in this
thread ....
For the benefit of others who may have seen the same problem
(which can also occur if you try to run something like a startup.pl
from the command line, which doesn't work in principle), make sure
you have the 'PerlModule Apache2' directive before you require
the startup file. Alternatively, stick in a 'use Apache2;' at the top
of the startup file.
best regards,
randy kobes
------------------------------
Date: Sun, 16 Feb 2003 16:37:00 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: use lib Apache->server_root_relative('lib/perl');
Message-Id: <Pine.LNX.4.53.0302161554410.16630@lxplus065.cern.ch>
On Feb 16, Tassilo v. Parseval inscribed on the eternal scroll:
> If you like it or not, the regulars (ie. those that do follow the
> conventions here) have some sort of control over this group because
^^^^^^^
> those are the ones you are likely to get help from, if any.
If you don't mind me saying so at this point, I feel that you made an
unfortunate choice of words there. The last thing that I would wish
to do is to "control" a newsgroup, and I suspect that goes for many of
the other regulars. Peer pressure, yes, sure; but "control", no
thanks. I try (in my not very effective way) to push people towards a
more self-disciplined way of going about their troubleshooting, in
which usenet discussion groups can certainly play a part - but they
need to play _their_ part in the deal too, or the equation doesn't
work.[1]
> The nitwits, that is people like you who publically declare how much
> they don't care about any rules, lack the experience and knowledge
> to give help (they have an unmatched competence in trolling though,
> oddly enough). Those are only the wanna-be consumers but the
> regulars in here generally take good care that there's not too much
> they can consume (save for a smack on the head).
Seems to fit. By the way, I see that the question was additionally
multiposted to alt.apache.configuration.
We seem to have been given no idea whether the questioner had ever got
Apache mod_perl applications working and has somehow encountered a new
problem, or whether this was their first attempt to work with it.
From another couple of postings not on this thread, it appeared the
questioner possibly hadn't found the documentation yet and was hoping
that other folks would read it over to him. In view of the lack of
context we have no idea whether he had now correctly followed the
recipe.
http://perl.apache.org/help/index.html says that:
The best place to get help with mod_perl is through the mailing lists
supported by users.
which could very well be the truth.
At least when trying to raise the topic on a more-general usenet
group, it would seem to be polite to supply some context for the
question.
But from someone who vociferously refuses to participate in the
community, and even brags about having misused Usenet "for years"
(presumably under a different pseudonym) but still refers to it as
"email" and posts TOFU, I guess this is too much to hope for.
sigh. All the best
[1] according to the posting guidelines, I shouldn't have said
"doesn't work" ;-)
------------------------------
Date: Sun, 16 Feb 2003 16:44:46 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: use lib Apache->server_root_relative('lib/perl');
Message-Id: <Pine.LNX.4.53.0302161640370.16630@lxplus065.cern.ch>
On Feb 16, Randy Kobes inscribed on the eternal scroll:
> For the benefit of others who may have seen the same problem
> (which can also occur if you try to run something like a startup.pl
> from the command line, which doesn't work in principle), make sure
> you have the 'PerlModule Apache2' directive before you require
> the startup file. Alternatively, stick in a 'use Apache2;' at the top
> of the startup file.
http://groups.google.com/groups?selm=gVt3a.114536%24tq4.3592%40sccrnsc01
Once again we see the (f)utility of fragmenting a discussion over
several groups without any kind of crossreference.
Usenet's solution to this is crossposting with followup-to.
------------------------------
Date: Sun, 16 Feb 2003 16:28:31 GMT
From: "Papa Oohmawmaw" <Pop@goesthe.net>
Subject: Re: use lib Apache->server_root_relative('lib/perl');
Message-Id: <P_O3a.124574$2H6.2220@sccrnsc04>
>1) Can someone tell me where the line below (a) is pointing to? It's from
my
>startup.pl file. I'm wanting it to go to "/home/perl_apache/lib/perl/."
> a) use lib Apache->server_root_relative('lib/perl');
The line is pointing to (on my system) /opt/apache. I called my cousin about
this. My nickname for him is "My Server Root Relative" (just kidding). I
don't have my lib/perl directories located here so that is one of my
problems. I have more. Server root may be different on each person's
machine. The default server root is /etc/httpd. This is for Open Linux and
Red Hat systems (or that's what my 'liburry' book says). But, you can change
it to what you like.
If you have a problem and want to know what I was wanting to know this
information is contained in your httpd.conf file.
My httpd.conf says this ServerRoot "/opt/apache"
For those involved in this chat via email, I'm not interested in learning
Perl (at this point). I'm trying to set up a website on a dedicated server
and want the benefits of Perl and Mod_perl. I got a dedicated server
specifically to set up "Apache::SpeedLimit.". I'm trying to learn enough to
do this. That's all. When, and if, I come across something else in Perl,
I'll start looking again. My future does not begin and end with Perl.
------------------------------
Date: Sun, 16 Feb 2003 16:30:31 GMT
From: "Papa Oohmawmaw" <Pop@goesthe.net>
Subject: Re: use lib Apache->server_root_relative('lib/perl');
Message-Id: <H0P3a.124978$SD6.5754@sccrnsc03>
Thanks, Randy, again for your help.
"Randy Kobes" <randy@theoryx5.uwinnipeg.ca> wrote in message
news:mTN3a.44150$7_.191635@news1.mts.net...
> "Papa Oohmawmaw" <Pop@goesthe.net>
> wrote in message news:veB3a.117585$iG3.14669@sccrnsc02...
> > 1) Can someone tell me where the line below (a) is pointing to? It's
from
> my
> > startup.pl file. I'm wanting it to go to "/home/perl_apache/lib/perl/."
> > a) use lib Apache->server_root_relative('lib/perl');
> > 2) The startup.pl file is at this address (b)
> > b) /home/perl_apache/lib/perl/startup.pl
> > 3) My httpd.conf is at this address (c)
> > c) /opt/apache/conf/httpd.conf
> > Here's the error message I'm getting when trying to start Apache (d).
> >
> > d) [root@ensim Apache2]# /opt/apache/bin/apachectl start
> > [error] Can't locate object method "server_root_relative" via package
> > "Apache" at /home/perl_apache/lib/perl/startup.pl line 5.
> > BEGIN failed--compilation aborted at
/home/perl_apache/lib/perl/startup.pl
> > line 5.
> > Compilation failed in require at (eval 1) line 1.
> >
> > [Sat Feb 15 18:37:35 2003] [error] Can't load Perl file:
> > /home/perl_apache/lib/perl/startup.pl for server ensim.rackshack.net:0,
> > exiting...
>
> You'd do well to take the advice of the other replies in this
> thread ....
>
> For the benefit of others who may have seen the same problem
> (which can also occur if you try to run something like a startup.pl
> from the command line, which doesn't work in principle), make sure
> you have the 'PerlModule Apache2' directive before you require
> the startup file. Alternatively, stick in a 'use Apache2;' at the top
> of the startup file.
>
> best regards,
> randy kobes
>
>
>
------------------------------
Date: 16 Feb 2003 16:08:24 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Win32::NetResource::GetSharedResources
Message-Id: <u9lm0gryx3.fsf@wcl-l.bham.ac.uk>
SAPBasis2003 <sapbasis2003@netscape.net> writes:
> I'm trying to use Win32::NetResource::GetSharedResources to retrieve
> all shares from a system. But, I don't get anything.
> Here is my code:
>
> $c_comp=0;
> undef @Resources;
> use Win32::NetResource;
> if (Win32::NetResource::GetSharedResources(\@Resources,
> RESOURCETYPE_DISK, ""))
> {
> map
> {
> $c_comp++;
> print "$_\n";
> }
> @Resources;
> }
>
> The output I get is:
> HASH(0x1a5742c)
> HASH(0x1abd35c)
> HASH(0x1abd374)
> HASH(0x1abd38c)
> HASH(0x1abd3a4)
Hang on you said "I don't get anything" but now you say you get an
array of 5 has references. If you look inside these hashes no doubt
you'll find information about the 5 resources that are shared by your
system.
> What am I missing?
The ability to give a consistant account.
The patenence to wait for an answer when you post.
The self-discipline to follow-up within the same thread when you want
elaborate on what you've said in a post.
use strict;
use warnings;
Any explaination of why you think what you are getting is wrong.
The documentation for GetSharedResources.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Sun, 16 Feb 2003 09:59:29 -0800
From: SAPBasis2003 <sapbasis2003@netscape.net>
Subject: Re: Win32::NetResource::GetSharedResources
Message-Id: <3E4FD181.4080506@netscape.net>
If you are going to reply to a post at least give a useful answer.
Your answer is very unhelpful.
You do not explain how to list the hash in readable form. That is, how
do I list the share name, path and remark?
Brian McCauley wrote:
> SAPBasis2003 <sapbasis2003@netscape.net> writes:
>
>
>>I'm trying to use Win32::NetResource::GetSharedResources to retrieve
>>all shares from a system. But, I don't get anything.
>>Here is my code:
>>
>>$c_comp=0;
>>undef @Resources;
>>use Win32::NetResource;
>>if (Win32::NetResource::GetSharedResources(\@Resources,
>>RESOURCETYPE_DISK, ""))
>>{
>>map
>> {
>> $c_comp++;
>> print "$_\n";
>> }
>>@Resources;
>>}
>>
>>The output I get is:
>>HASH(0x1a5742c)
>>HASH(0x1abd35c)
>>HASH(0x1abd374)
>>HASH(0x1abd38c)
>>HASH(0x1abd3a4)
>
>
> Hang on you said "I don't get anything" but now you say you get an
> array of 5 has references. If you look inside these hashes no doubt
> you'll find information about the 5 resources that are shared by your
> system.
>
>
>>What am I missing?
>
>
> The ability to give a consistant account.
>
> The patenence to wait for an answer when you post.
>
> The self-discipline to follow-up within the same thread when you want
> elaborate on what you've said in a post.
>
> use strict;
>
> use warnings;
>
> Any explaination of why you think what you are getting is wrong.
>
> The documentation for GetSharedResources.
>
------------------------------
Date: Sun, 16 Feb 2003 11:44:47 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Win32::NetResource::GetSharedResources
Message-Id: <slrnb4vjgf.fu4.tadmc@magna.augustmail.com>
SAPBasis2003 <sapbasis2003@netscape.net> wrote:
> The output I get is:
> HASH(0x1a5742c)
> HASH(0x1abd35c)
> HASH(0x1abd374)
> HASH(0x1abd38c)
> HASH(0x1abd3a4)
>
> What am I missing?
A DEreference.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
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 4573
***************************************