[10680] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4272 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 21 23:07:16 1998

Date: Sat, 21 Nov 98 20:00:16 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 21 Nov 1998     Volume: 8 Number: 4272

Today's topics:
        Abstact Classes <Martin.Drautzburg@kst.siemens.de>
    Re: Beginner Book? <shaggy@nettally.com>
    Re: CGI security -- help!!!!!! (Tad McClellan)
        Hey all i am looking (J. J. Goodrich)
    Re: HTTP_REFERER and Browser History <bill@fccj.org>
    Re: HTTP_REFERER and Browser History <bill@fccj.org>
    Re: HTTP_REFERER and Browser History <flavell@mail.cern.ch>
    Re: HTTP_REFERER and Browser History <newspost@morlock.net>
    Re: HTTP_REFERER and Browser History <privateer@thevortex.com>
    Re: Is there a compiler for Perl? (Peter)
    Re: Is there a compiler for Perl? (Peter)
    Re: Matching Text Outside HTML Tags (Tad McClellan)
    Re: Regex-ing an entire file: How to? <Arved_37@chebucto.ns.ca>
        Required Fields --HELP <softsci@eagle.ca>
    Re: Required Fields --HELP <r28629@email.sps.mot.com>
        RPM complie error lincr@usa.net
    Re: RPM complie error <perlguy@technologist.com>
        SNMP::Util problem ? <graz@mindless.com>
    Re: Stdin <tbsmith@viper.net>
    Re: Stdin (Matthew Bafford)
        Why doesn't something work? (Alan Young)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 11 Nov 1998 11:47:17 +0100
From: Martin Drautzburg <Martin.Drautzburg@kst.siemens.de>
Subject: Abstact Classes
Message-Id: <uad86usdze.fsf@kst.siemens.de>

Is there a way to define abstract classes, so that any attempt to
instantiate such a class (or a derived class that left some methods
abstract) leads to a *compile* time error ?
-- 
Martin Drautzburg, Siemens Electrocom
	VOICE: 8636-18 (work), 69 99 18 (home);  FAX: 8625-93 (work)



------------------------------

Date: Sat, 21 Nov 1998 21:54:16 -0500
From: shaggy <shaggy@nettally.com>
Subject: Re: Beginner Book?
Message-Id: <36577CD8.18FA4CC7@nettally.com>

Well, as a complete beginner ( hey i thought perl was a knitting stitch, C was a
vitamin and programming was something ya do to your TV with a remote, ok?)
I went out and bought Perl5 by Example, author David Medinets. I have no idea if
the book is any good because I rudely discovered I don't have Perl on my PC
(Win98 Compaq) and cannot for the life of me make sense of the installation
instructions.
"(1) Run 'install' from the command line
 (this is located in \Perl which must be the current directory)"
Ah... i thought I had to install it first before I could get to it's directory?
Jeez, couldn't he just assume there are people out here who REALLY know nothing?

Can this actually be installed on a Win98 'puter? (Don't s'pose Windows will
just DO it, huh.)
And if so...is there anyone out there who would be willing to tell me how,
y'know in language for an idiot,  like " put the cursor to the right of the /
and click the left mouse button while holding down the shift key and tapping the
Alt button in two time."
Just to get it installed. Then I'll be fine.

Thanks.
regards,
Shaggy


SnowSimulation wrote:

> In article <ex$yyZOF#GA.330@nih2naac.prod2.compuserve.com>, "AJ"
> <ajonsson@csi.com> wrote:
>
> [snip]
>
> >...I think telling someone to become comfortable
> > in programming in a compiled language before learning a scripting language
> > seems, to me, to be the wrong approach...
>
> it is but that's never stopped anyone
>
> > ...I've had the MacPerl book recommended to me.  One of
> > these days I need to get it and see how that works out.
>
> nice effort...check out their web site if you can't seem to find the time
> for the paper version

--
Mikey's Methods to Money or Madness
http://www.mikeysmethods.com

Simple, successful trading strategies for the short funded


There is very real risk of monetary loss in trading commodity futures.
Please papertrade many systems before investing real money.
Never trade using money you cannot afford to lose.




------------------------------

Date: Sat, 21 Nov 1998 19:17:44 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: CGI security -- help!!!!!!
Message-Id: <ono737.hs2.ln@flash.net>

Kumar Sundaram (softsci@eagle.ca) wrote:

: Also, I would like to know, if user enters the his/her name in the name
: field I want only letters and maybe a ,(comma) .  


   print "only letters, spaces and commas are allowed in the name field\n"
      unless $name =~ /^[a-zA-Z, ]+]$/;


: I don't want user to input
: numbers in the name field and letters in phone number field.  Does anybody
: know how to do this?


   print "no letters are allowed in the phone number field\n"
      if $phone =~ /[a-zA-Z]/;


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Sat, 21 Nov 1998 21:47:49 -0500 (EST)
From: JJ353@webtv.net (J. J. Goodrich)
Subject: Hey all i am looking
Message-Id: <4086-36577B55-21@newsd-198.iap.bryant.webtv.net>

Hey all im looking for a script that will
allow me to set a cookie when a person logs in and if tehy dont ahve the
cookie then they cant visit the pages.... I would like to make it tow
here if they dont login in then they cant access any of my pages that im
trying to protect without first going to the login and getting the
cookie is this possible if so could someone direct me to the script that
will allow me to do this im a newbie so go light on the technical talk



------------------------------

Date: Sat, 21 Nov 1998 19:12:15 -0500
From: Bill Jones <bill@fccj.org>
Subject: Re: HTTP_REFERER and Browser History
Message-Id: <365756DE.D78F9B67@fccj.org>

Dan Brian wrote:
> 
> HTTP_REFERER (and all CGI ENV variables) are web-server-dependent variables;
> I don't know if HTTP_REFERER exists outside of Apache. Also, the script must be
> linked to via an <a href> tag or a submitted form from another doc to have a
> value set.
> 

HTTP is specified by RFC, much like SMTP.
if a WWW server truely follows internet standards,
then it will understand HTTP_REFERER.

Apache just understands the RFC best :]

HTH,
-Sneex- :]


------------------------------

Date: Sat, 21 Nov 1998 19:12:49 -0500
From: Bill Jones <bill@fccj.org>
Subject: Re: HTTP_REFERER and Browser History
Message-Id: <36575700.9649958@fccj.org>

Bob Tate wrote:
> 
> Also, does anyone know how to read in the web browser history from the users
> machine?

Nope.  Privacy issues...

HTH,
-Sneex- :]


------------------------------

Date: Sun, 22 Nov 1998 01:52:29 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: HTTP_REFERER and Browser History
Message-Id: <Pine.HPP.3.95a.981122013658.22620B-100000@hpplus01.cern.ch>

On Sat, 21 Nov 1998, Bob Tate wrote:

> I am doing some research on the $ENV{'HTTP_REFERER'} variable in Perl. 

You're asking in the wrong place.  Perl gives access to the environment,
period.  What that environment is, depends on how you got it.  If you're
in a CGI, then it's specified in the CGI specification, and your
questions (after checking the FAQ) belong on the c.i.w.authoring.cgi
group. If it's SSI then it's rather more server dependent, and there's
no clear consensus on where to discuss it.  c.i.w.a.cgi again, or
c.i.w.servers.{OS} are likely places. 

> have tried this in Perl 5 and on both a Solaris Unix and Digital Unix
> machines. 

You're right to give some details, but these, as it happens, are
irrelevant, though. 

> So far I have not been able to get the $ENV{'HTTP_REFERER'} to
> return a response  It is always blank.

Do you mean it is blank, or do you mean it isn't defined at all?  These
are seriously different, you know.  (And if you've got -w on, which if
you're developing a CGI, you _should_ - see the Perl bugs list for
further insights - then you'll soon find out the difference) 

We need to know more about your situation, but not here.  A CGI tutorial
might not come amiss, depending on your background, which it's difficult
to assess from your posting.

Note that just typing in the URL of your CGI to a browser dialog isn't
going to be useful.  If the browser's working properly, then in that
situation there isn't a referer, so it shouldn't be defined at all. 

> Is its use limited to a
> certain version of Perl or web server?

Absolutely not.  It would be the same if you were writing your CGI
programs in COBOL...  (not that I have the remotest clue how to do 
that.  FORTRAN, perhaps...  ;-)

> Also, does anyone know how to read in the web browser history from the users
> machine?

Sounds like a serious security exposure to me.  If you can do it, I want
it stopped, right now.  

f'ups prophylactically set.

-- 

    "Physicists write FORTRAN in any language" - software consultant at
                                                                CERN



------------------------------

Date: Sat, 21 Nov 1998 21:15:39 -0500
From: "Steven Morlock" <newspost@morlock.net>
Subject: Re: HTTP_REFERER and Browser History
Message-Id: <DvK52.88$PI4.483938@lwnws01.ne.mediaone.net>


The 'Referer' is propagated from the client's web browser through the web
server
to the environment for use by a CGI script.  That means there is at least
two places
where the information can be stripped off.  There are many software products
catering to the more paranoid folks that will remove fields in the HTTP
request
headers with 'Referer' being one of the more common.

Note that HTTP_REFERER it is common enough though for Lincoln Stein to
include a 'referer' method in his CGI.pm

I've included a couple of CGI/HTTP references below.

As far as browser history, I've never tried to peek into it.  I have used
links similar
to the following to move folks through their history under Internet Explorer
& Netscape:

  <a href="javascript:history.back()">Back</a>

Steven Morlock, Foliage Software Systems

+++++++++++++++

>From the CGI/1.1 Revision 00 Specification on the Common Gateway Interface
RFC Project Page:
  http://web.golux.com/coar/cgi/

4.5. HTTP_*
These variables are specific to requests made with HTTP. Interpretation of
these variables depends on the value of SERVER_PROTOCOL.

Meta-variables with names beginning with "HTTP_" contain header data read
from the client, if the protocol used was HTTP. The HTTP header field name
is converted to upper case, has all occurrences of "-" replaced with "_" and
has "HTTP_" prepended to give the meta-variable name. The header data MAY be
presented as sent by the client, or MAY be rewritten in ways which do not
change its semantics. If multiple header fields with the same field-name are
received then they MUST be rewritten as a single header field having the
same semantics before being represented in a meta-variable. Similarly, a
header field that is received on more than one line MUST be merged into a
single line. The server MUST, if necessary, change the representation of the
data (for example, the character set) to be appropriate for a CGI
meta-variable.

The server is not required to create meta-variables for all the header
fields that it receives. In particular, it MAY remove any header fields
carrying authentication information, such as "Authorization"; and it MAY
remove header fields whose value is available to the script via other
variables, such as "Content-Length" and "Content-Type".
------
>From the RFC2068: (HTTP 1.1 Hypertext Transfer Protocol):
  http://www.w3.org/pub/WWW/Protocols/rfc2068/rfc2068

14.37 Referer

   The Referer[sic] request-header field allows the client to specify,
   for the server's benefit, the address (URI) of the resource from
   which the Request-URI was obtained (the "referrer", although the
   header field is misspelled.) The Referer request-header allows a
   server to generate lists of back-links to resources for interest,
   logging, optimized caching, etc. It also allows obsolete or mistyped
   links to be traced for maintenance. The Referer field MUST NOT be
   sent if the Request-URI was obtained from a source that does not have
   its own URI, such as input from the user keyboard.

        Referer        = "Referer" ":" ( absoluteURI | relativeURI )

   Example:

        Referer: http://www.w3.org/hypertext/DataSources/Overview.html

   If the field value is a partial URI, it SHOULD be interpreted
   relative to the Request-URI. The URI MUST NOT include a fragment.

     Note: Because the source of a link may be private information or
     may reveal an otherwise private information source, it is strongly
     recommended that the user be able to select whether or not the
     Referer field is sent. For example, a browser client could have a
     toggle switch for browsing openly/anonymously, which would
     respectively enable/disable the sending of Referer and From
     information.


Bob Tate wrote in message <36574bea.0@news.primary.net>...
>I am doing some research on the $ENV{'HTTP_REFERER'} variable in Perl.  I
>have tried this in Perl 5 and on both a Solaris Unix and Digital Unix
>machines.  So far I have not been able to get the $ENV{'HTTP_REFERER'} to
>return a response  It is always blank.  I have looked at the %ENV and the
>HTTP_REFERER is not listed there either.  I see some references to it and
>seen a page or two that show that it does work.  Is its use limited to a
>certain version of Perl or web server?
>
>Also, does anyone know how to read in the web browser history from the
users
>machine?
>
>
>




------------------------------

Date: Sat, 21 Nov 1998 20:22:06 -0700
From: Paul Roberts <privateer@thevortex.com>
To: Bob Tate <btate@primary.net>
Subject: Re: HTTP_REFERER and Browser History
Message-Id: <3657835D.EBA41ECD@thevortex.com>

The PERL module CGI.pm contains the subroutine referer() that you might want to
look at and it might also contain other browser history subroutines.

Bob Tate wrote:

> I am doing some research on the $ENV{'HTTP_REFERER'} variable in Perl.  I
> have tried this in Perl 5 and on both a Solaris Unix and Digital Unix
> machines.  So far I have not been able to get the $ENV{'HTTP_REFERER'} to
> return a response  It is always blank.  I have looked at the %ENV and the
> HTTP_REFERER is not listed there either.  I see some references to it and
> seen a page or two that show that it does work.  Is its use limited to a
> certain version of Perl or web server?
>
> Also, does anyone know how to read in the web browser history from the users
> machine?

--
Your humble servant (but hide the good china),

The Privateer <privateer@thevortex.com>
ICQ# 15447874
Anime Files at http://www.geocities.com/Area51/Cavern/6910/anime.html
Free Web Cruiser at
http://www.geocities.com/SiliconValley/Vista/7829/cruise.html




------------------------------

Date: Sat, 21 Nov 1998 23:54:00 GMT
From: peter@helpnet.com.au (Peter)
Subject: Re: Is there a compiler for Perl?
Message-Id: <36594fb7.1869687@news.flex.com.au>

Hello Pasc,
Thank you for the reference.  I am following up on Perl2exe as
mentioned in another post then will hunt through the FAQ.

I am after a compiler so I can execute a simple program from a CD.
Performance is not important in this case as the program will not run
for long.

I like the idea of not distributing source code so I do not get calls
from people who change source code then still want support.

Peter 

On Wed, 11 Nov 1998 00:08:14 -0500, Pasc <pascual@SPAMZONE.iname.com>
wrote:

>Peter,
>
>Yes.  In the Perl 5.005 announcement, listed with other new things that are
>considered experimental:
> 	"A suite of compiler modules with various backends, for producing C or
>bytecode from Perl, and for various useful diagnostics." 
>-> http://language.perl.com/doc/manual/html/READMEs/Announce.html
>
>See also the FAQ:
>-> http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html#How_can_I_compile_my_Perl_progra
>
>There isn't much use for it though.  From what I hear, the performance
>difference isn't all that much.  I'd rather keep my Perl the way it was
>supposed to be.  ;-)
>
>--
>Pasc



------------------------------

Date: Sun, 22 Nov 1998 02:39:26 GMT
From: peter@helpnet.com.au (Peter)
Subject: Re: Is there a compiler for Perl?
Message-Id: <365a5439.3023859@news.flex.com.au>

Hello Clinton,
I agree with your comments on an easy install.  I just tried to
install a program that highlights how bad an install can be.

Program X has a note half way through that says program Y is a
prerequisite and the install program will screw up the directories if
the other modules are not installed first.

I had to back out the completed installation steps then start
installing Program Y.  Half way through there was a note saying I had
to install some other package.

I gave up.

The program I want to create has to run before any installation steps.
I tried a few compilers for various languages.  All said they would
create stand alone .exe files.  All needed .DLLs installed in Windows
before the .exe would work.  None of them could stand alone.

Now I have downloaded Perl2exe, I found a note about .DLLs.  I am
hoping it is relevant only to the small option.

Peter

On Thu, 12 Nov 1998 14:30:04 GMT, cpierce1@mail.ford.com (Clinton
Pierce) wrote:

>On Thu, 12 Nov 1998 12:19:53 +0100, Jan Bessels
><j.bessels@wolverine.demon.nl> wrote:
>
>>> Yes.  In the Perl 5.005 announcement, listed with other new things that are
>>> considered experimental:
>>>         "A suite of compiler modules with various backends, for producing C or
>>> bytecode from Perl, and for various useful diagnostics."
>>> -> http://language.perl.com/doc/manual/html/READMEs/Announce.html
>>> 
>>> See also the FAQ:
>>> -> http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html#How_can_I_compile_my_Perl_progra
>>> 
>>> There isn't much use for it though.  From what I hear, the performance
>>> difference isn't all that much.  I'd rather keep my Perl the way it was
>>> supposed to be.  ;-)
>>
>>When writing commercial programs distributing executables instead of the
>>original Perl source code is very attractive. The main advantage here
>>isn't speed but unreadability...
>
>Some people would consider the ability to just distribute a single
>executable and a library or two the biggest win in a perl compiler.
>(And utilities along the lines of "perl2exe".)
>
>Personally, I do this all the time.  It's MUCH easier to install 1 EXE
>file and 2 DLL files (even if they are 3MB) than to unroll the entire
>GSAR perl distribution onto a system.  Especially if your customer
>couldn't give a whit about development.  I usually include the source
>code in the distribution but for installation and distribution purposes,
>nothing beats compiling/perl2exe'ing...



------------------------------

Date: Sat, 21 Nov 1998 19:13:13 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Matching Text Outside HTML Tags
Message-Id: <9fo737.hs2.ln@flash.net>

dodadnau@my-dejanews.com wrote:
: What regex should be used to match text outside of HTML tags in an HTML
: document?


   None.

   This cannot be done reliably with regular expressions.

   See the Perl FAQ part 9 for how to do it reliably:

      "How do I remove HTML from a string?"


: For example:

: <!--Northern Arizona University URL-->
: <a href="http://www.nau.edu">Northern Arizona University</a>

: Would like the regex to match "Northern Arizona University" outside tags (not
: just that string...would generally like to match *any* string outside HTML
: tags, keeping all tags intact).


   A dirty hack that is broken, and is Not Good, and would never
   be used by a conscientious programmer, and should never be
   posted but is posted anyway, would be:


while ( /<[^>]+>([^<]*)<[^>]+>/g ) {
   print "$1\n";
}


   But don't use that. Do it like the FAQ suggests.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Sat, 21 Nov 1998 23:45:27 -0400
From: Arved Sandstrom <Arved_37@chebucto.ns.ca>
Subject: Re: Regex-ing an entire file: How to?
Message-Id: <Pine.GSO.3.95.iB1.0.981121234241.20163C-100000@halifax.chebucto.ns.ca>

As far as doing it line for line, that depends on your RE's.

As an alternative to reading all lines into an array, and joining that
into a scalar, setting $/ to undef before $data = <FILEHANDLE> will slurp
in the whole file, since no input record separator is defined.

On Thu, 19 Nov 1998, Alistair Calder wrote:

> What I want to do is read a file, run some RE's on the entire thing and
> write it back to the server.  I tried bringing it into @DATA and doing
> something like this:
> 
> @DATA =~ s/Santa/Elves/;
> 
> but it gave me errors to do with substitutions being done under
> scalar(@array).  I am confused and I can't figure out how to parse the
> entire file all at once.
> 
> Should I just do it line for line with a
> 
> foreach $line(@DATA){ ...}



------------------------------

Date: Sat, 21 Nov 1998 21:00:28 -0500
From: "Kumar Sundaram" <softsci@eagle.ca>
Subject: Required Fields --HELP
Message-Id: <737rda$ick$1@mur2.odyssey.on.ca>

Hi:
I am very new to perl/cgi programming and I have a question.  Currently, I
am working on writing a perl/cgi script to process my html input form.  I
have problem with the following:
I want to use the following variables in my html file for missiing fields
and I want look like the line below
<input type="hidden" name="required" value="name,email,city,etc,etc">
Could anyone please provide me the code in cgi/perl script in order to do
this task?
Yes, I want to define the required field variables in the html file using
"hidden" type.  I don't want to define them inside the script!!!
Thanks for your help in advance.
Kumar




------------------------------

Date: Sat, 21 Nov 1998 21:22:10 -0500
From: Tk Soh <r28629@email.sps.mot.com>
To: Kumar Sundaram <softsci@eagle.ca>
Subject: Re: Required Fields --HELP
Message-Id: <36577540.2A469F86@email.sps.mot.com>

[posted to c.l.p.m and copy emailed]

Kumar Sundaram wrote:
> 
> Hi:
> I am very new to perl/cgi programming and I have a question.  Currently, I
> am working on writing a perl/cgi script to process my html input form.  I
> have problem with the following:
> I want to use the following variables in my html file for missiing fields
> and I want look like the line below
> <input type="hidden" name="required" value="name,email,city,etc,etc">
> Could anyone please provide me the code in cgi/perl script in order to do
> this task?
> Yes, I want to define the required field variables in the html file using
> "hidden" type.  I don't want to define them inside the script!!!
> Thanks for your help in advance.
> Kumar

I have no intention to flame anyone, but I have seen your three posts in a
day, each, though not exactly the same, basically spinning around the same
topic, and eventhough others had tried to answer the previous two. Worst of
all, none of your CGI questions were really related to Perl (even if you are
using Perl for you CGI). You should try other ng othe right topic
(comp.infosystems.www.authoring.cgi, for one), which you should have better
luck with your problem.

Also you may find CGI.pm helpful in your application.

HTH.

-TK


------------------------------

Date: Sun, 22 Nov 1998 00:49:25 GMT
From: lincr@usa.net
Subject: RPM complie error
Message-Id: <737n2h$mj6$1@nnrp1.dejanews.com>

I met problem when I installed RPM-2.5.5 on my slackware-2.9-i386 system.

It says these warnings when I executed " ./configure" :

 ... checking for gettext in -lintl... (cached) no configure: warning: sorry
this package needs libintl.a (from the	gettext package) checking for
xgettext... no xgettext and libintl.a don't both exist; will not build i18n
support ... checking for gzread in -lgz... (cached) no configure: warning:
sorry this package needs libz.a or libgz.a (from the zlib pa ckage) ...

Where can I get gettext and zlib packages ?

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Sat, 21 Nov 1998 21:18:58 -0600
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: RPM complie error
Message-Id: <365782A2.CC049446@technologist.com>

lincr@usa.net wrote:
> 
> I met problem when I installed RPM-2.5.5 on my slackware-2.9-i386 system.
> 
> It says these warnings when I executed " ./configure" :
> 
> ... checking for gettext in -lintl... (cached) no configure: warning: sorry
> this package needs libintl.a (from the  gettext package) checking for
> xgettext... no xgettext and libintl.a don't both exist; will not build i18n
> support ... checking for gzread in -lgz... (cached) no configure: warning:
> sorry this package needs libz.a or libgz.a (from the zlib pa ckage) ...
> 
> Where can I get gettext and zlib packages ?

And this is a Perl question because....?
-- 
Java?  I've heard of it, it is what I drink while hacking Perl! -me
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$            Brent Michalski             $
$         -- Perl Evangelist --          $
$    E-Mail: perlguy@technologist.com    $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


------------------------------

Date: Sun, 22 Nov 1998 01:26:39 +0000
From: Graham Ashton <graz@mindless.com>
Subject: SNMP::Util problem ?
Message-Id: <Pine.LNX.4.03.9811220054100.4438-100000@capella.futures.bt.co.uk>

I'm having problems installing either version 1.0 or 1.1 of the SNMP::Util
package. SNMP::Util depends on the SNMP package, versions 1.7 or greater.
I have installed version 1.8b5.

The SNMP::Util Makefile.PL with 1.0 doesn't work properly at all, and
"make test" failes with version 1.1. Here's what it says.

--
capella:~/temp/perl/SNMP-Util-1.1$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib
-I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5 -e 'use Test::Harness
qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/libtest...........Can't locate auto/SNMP/mapInt.al in @INC (@INC
contains: . ./blib/arch ./blib/lib /usr/lib/perl5/i386-linux/5.00404
/usr/lib/perl5/i386-linux/5.00404 /usr/lib/perl5/i386-linux/5.00404
/usr/lib/perl5 /usr/lib/perl5/i386-linux/5.00404
/usr/lib/perl5/i386-linux/5.00404 /usr/lib/perl5
/usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl/i386-linux
/usr/lib/perl5/site_perl . /usr/lib/perl5/i386-linux/5.00404
/usr/lib/perl5 /usr/lib/perl5/site_perl/i386-linux
/usr/lib/perl5/site_perl .) at blib/lib/SNMP/Util.pm line 1959
dubious
        Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 3-8
        Failed 6/8 tests, 25.00% okay
Failed Test  Status Wstat Total Fail  Failed  List of failed
-------------------------------------------------------------------------------
t/libtest.t       2   512     8    6  75.00%  3-8
Failed 1/1 test scripts, 0.00% okay. 6/8 subtests failed, 25.00% okay.
make: *** [test_dynamic] Error 2
--

It looks to me like there's either a problem with my installed SNMP-1.8b5
(on which SNMP-Util depends), or there's something wrong with my Perl
installation. My Perl installation (Linux, Red Hat 5.1, .rpm for
perl-5.004-6) seems fine to me.

If I install it anyway it seems okay, but then when I run a script that
gets any SNMP object that returns a text value (rather than an integer),
it crashes the script with;

  Can't locate auto/SNMP/mapInt.al in @INC (@INC contains: ... etc, etc.

When you install SNMP-1.8b5 there's no mention of a file called
auto/SNMP/mapInt.al. I don't have a "mapInt.al" file on my system, and I'm
guessing that it should come from the SNMP-1.8b5 package.

Has anybody got any suggestions? I need to use SNMP::Util rather urgently,
and am a bit stuck.

What should I do? Re-install Perl from source? Contact the respective
authors?

TIA...

--
Graham Ashton



------------------------------

Date: Sat, 21 Nov 1998 18:02:32 -0600
From: Todd Smith <tbsmith@viper.net>
Subject: Re: Stdin
Message-Id: <36575498.CC725CF6@viper.net>

print while <STDIN>;

Aaron Delong wrote:

> while (<STDIN>)
> {
>      print $_;
> }
>
> The code above should echo all data submitted via stdin.
>
> On Thu, 19 Nov 1998, Matthew Foley wrote:
>
> > How do i read info from stdin in and parse it as a varible.  Thanks
> >
> >
> >
> >

--
_______________
Todd Smith
Perl Programmer
ITC^Deltacom




------------------------------

Date: Sat, 21 Nov 1998 19:54:21 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: Stdin
Message-Id: <MPG.10c12ac9ceea26fc989727@news.scescape.net>

In article <36575498.CC725CF6@viper.net>, tbsmith@viper.net says...
=> print while <STDIN>;

Oh my.

Why not:

print <STDIN>;

?

:-)

=> Aaron Delong wrote:
=> 
=> > while (<STDIN>)
=> > {
=> >      print $_;
=> > }

[snip]


--Matthew


------------------------------

Date: Sun, 22 Nov 1998 00:45:40 GMT
From: alany@2021.com (Alan Young)
Subject: Why doesn't something work?
Message-Id: <36585d6a.87709550@news.supernews.com>

I'm having a problem understanding why something will work one way and
not another.  Here's the code snippet (look for ---> ):

while ( ( $c =~ m/(\S*)/gm ) )
{
  if ( $1 =~ /^EO.:$/ )
  {
    # do nothing

    # EOR is the end of the record.  If this were a multi-record
    # response we would need to increment our record count.

    # EOF is the end of the response.
  }
  else
  {
    $1 =~ /^(\S*)=(\S*)$/;
    if ( $1 )
    {
      $totals_info{$1} = $2;
#---> Why doesn't %totals_info = ( $1 => $2 ) work?
    }
  }
}

If I try the code as indicated above I get *one* entry in totals_info.
Can anyone shed any light on this for me?

Thanks,

Alan


------------------------------

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 4272
**************************************

home help back first fref pref prev next nref lref last post