[18525] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 693 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 13 14:05:39 2001

Date: Fri, 13 Apr 2001 11:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <987185108-v10-i693@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 13 Apr 2001     Volume: 10 Number: 693

Today's topics:
    Re: A CGI question (Anno Siegel)
        ANNOUNCE: Carp::Notify 1.10 <jim3@psynet.net>
    Re: CGI.pm V. Here Docs . . . <bernie@fantasyfarm.com>
    Re: changing @INC permenently <bernie@fantasyfarm.com>
    Re: changing @INC permenently <bernie@fantasyfarm.com>
    Re: changing @INC permenently (Abigail)
    Re: how do i suppress STDOUT (Jay Tilton)
        howto access serial devices in Perl? / "minicom" light <ciechowski@cis-computer.com>
    Re: howto access serial devices in Perl? / "minicom" li <news@simonflack.com>
        HP Openview (Ron Reidy)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 13 Apr 2001 17:24:01 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: A CGI question
Message-Id: <9b7cnh$iqd$2@mamenchi.zrz.TU-Berlin.DE>

According to Cameron Dorey  <camerond@mail.uca.edu>:
> "Randal L. Schwartz" wrote:
> > 
> > The problem we have is that most people really can't tell whether it's
> > a Perl question, or a CGI question.  And CIWAC is slightly harder to
> > find than CLPM (apparently), so CLPM seems to take the brunt of the
> > mistakes.
> 
> True. I was just wondering how the "kids" were finding clpm, and if it
> were through some keyword search, they might visit a ciwacp newsgroup
> first. To be honest, I haven't been over to ciwac for a while now, so I
> don't have any feel for just low low-volume a group it is. Thanks for
> your input.

One contribution may be "authoring" in the name. "Gee, I'm not authoring
anything.  I just want to know why this Perl guestbook thingie gives me
errors."

Anno



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

Date: Fri, 13 Apr 2001 03:17:00 GMT
From: Jim Thomason <jim3@psynet.net>
Subject: ANNOUNCE: Carp::Notify 1.10
Message-Id: <tde7mca570595a@corp.supernews.com>

v1.10 is a typical .x0 release from me, cleaned up the internals, fixed 
some obscure bugs, added some more features.  Should be 100% backwards 
compatible from v1.00.  Must have upgrade for all users, IMHO.

Carp::Notify 1.10 should be making its way out to a CPAN mirror near you 
in the very near future as soon as the syncher picks it up.

Carp::Notify - Loudly complain in lots of places when things break 
badly.  Easily log errors to a file and email a sysadmin, transparently 
to you the happy perl programmer.

AUTHOR

Jim Thomason thomasoniii@yahoo.com

SYNOPSIS

Use it in place of die or croak, or warn or carp.

 #with Carp;
 use Carp;
 if ($something_a_little_bad) { carp("Oh no, a minor error!")};
 if ($something_bad) { croak ("Oh no an error!")};


 #with Carp::Notify;
 use Carp::Notify;
 if (something_a_little_bad) {notify("Oh no, a minor error!")};
 if ($something_bad) { explode ("Oh no an error!")};

REQUIRES

Perl 5.005, Socket (for emailing)




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

Date: Fri, 13 Apr 2001 11:27:05 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Re: CGI.pm V. Here Docs . . .
Message-Id: <a96edtch1knpmum63t67bmlmpjckdefmb9@news.supernews.net>

mjd@plover.com (Mark Jason Dominus) wrote:

} No development is done because cgi-lib.pl is *complete*.
} It does what it was designed to do, and it does it effectively.
} No bugs have been reported in it for *six years*.
} 
} I would think that not having to constantly install new incompatible
} versions of the same package would be a considered benefit.  Yuou can
} be absolutely sure that your program will never break when you
} 'upgrade' to an incompatible version of cgi-lib.pl, because there are
} no incompatible versions and no 'upgrades'.  
} 
} It is sad that greedy software companies have inured us to buggy,
} incomplete software that is followed by an endless stream of
} enhancements and bug fixes.

Amen -- you left out one other thing: we're inured to programs that have
overly complicated, vague and constantly changing requirements and so can
*never* be said to be "done".

It is actually a surprising (and fairly rare!) testament to the stability
of the CGI spec and the careful setup of the functional requirements for
cgi-lib that it is really _done_...  I wish that *ANY* program I've ever
written could mature enough to get to that lofty plateau..:o)

  /Bernie\
-- 
Bernie Cosell                     Fantasy Farm Fibers
bernie@fantasyfarm.com            Pearisburg, VA
    -->  Too many people, too few sheep  <--          


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

Date: Fri, 13 Apr 2001 11:31:03 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Re: changing @INC permenently
Message-Id: <3s6edt03o2hp1gdfp0g16j3qpq8el7tm20@news.supernews.net>

Michael Carman <mjcarman@home.com> wrote:

} Kim C wrote:
} > 
} > Setting the PERL5LIB environment setting did the trick, and your
} > suggestion of 'use lib /.../' will also be helpful for one-offs as it
} > is far slimmer than the BEGIN { push @INC ... } I've been using. ;-)
} 
} This should be obvious, but you'll have to add the path to PERL5LIB on
} *each* machine that will be using the library. If that ends up being a
} lot of machines (i.e. everyone on your network) it may be simpler to put
} a 'use lib' in the scripts that need it. Other options may exist if you
} are running Perl from a network.

Maybe, if it is a unix machine you might be able to get by with just adding
it to /etc/profile.

  /Bernie\
-- 
Bernie Cosell                     Fantasy Farm Fibers
bernie@fantasyfarm.com            Pearisburg, VA
    -->  Too many people, too few sheep  <--          


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

Date: Fri, 13 Apr 2001 11:53:54 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Re: changing @INC permenently
Message-Id: <578edt0uu482afj69f0gl2iffr03sofmhh@news.supernews.net>

Bernie Cosell <bernie@fantasyfarm.com> wrote:

} Michael Carman <mjcarman@home.com> wrote:
} 
} } Kim C wrote:
} } > 
} } > Setting the PERL5LIB environment setting did the trick, and your
} } > suggestion of 'use lib /.../' will also be helpful for one-offs as it
} } > is far slimmer than the BEGIN { push @INC ... } I've been using. ;-)
} } 
} } This should be obvious, but you'll have to add the path to PERL5LIB on
} } *each* machine that will be using the library. If that ends up being a
} } lot of machines (i.e. everyone on your network) it may be simpler to put
} } a 'use lib' in the scripts that need it. Other options may exist if you
} } are running Perl from a network.
} 
} Maybe, if it is a unix machine you might be able to get by with just adding
} it to /etc/profile.

[PS: Yes, I know that his original inquiry was specifically about
Activestate/Win2K.  This was just an FYI for a trick for doing this sort of
thing on UNIX]
-- 
Bernie Cosell                     Fantasy Farm Fibers
bernie@fantasyfarm.com            Pearisburg, VA
    -->  Too many people, too few sheep  <--          


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

Date: Fri, 13 Apr 2001 17:21:34 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: changing @INC permenently
Message-Id: <slrn9dedcu.aee.abigail@tsathoggua.rlyeh.net>

Bernie Cosell (bernie@fantasyfarm.com) wrote on MMDCCLXXXII September
MCMXCIII in <URL:news:3s6edt03o2hp1gdfp0g16j3qpq8el7tm20@news.supernews.net>:
`' Michael Carman <mjcarman@home.com> wrote:
`' 
`' } Kim C wrote:
`' } > 
`' } > Setting the PERL5LIB environment setting did the trick, and your
`' } > suggestion of 'use lib /.../' will also be helpful for one-offs as it
`' } > is far slimmer than the BEGIN { push @INC ... } I've been using. ;-)
`' } 
`' } This should be obvious, but you'll have to add the path to PERL5LIB on
`' } *each* machine that will be using the library. If that ends up being a
`' } lot of machines (i.e. everyone on your network) it may be simpler to put
`' } a 'use lib' in the scripts that need it. Other options may exist if you
`' } are running Perl from a network.
`' 
`' Maybe, if it is a unix machine you might be able to get by with just adding
`' it to /etc/profile.


Or better: recompile. When Configuring, you have the option of adding
directories to @INC.

Or else, write a wrapper.


Abigail


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

Date: Fri, 13 Apr 2001 15:20:16 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: how do i suppress STDOUT
Message-Id: <3ad70fad.80173608@news.erols.com>

On Fri, 13 Apr 2001 08:48:43 -0500, "ac" <clarke@hyperformix.com>
wrote:

>I have an application which is emitting unwanted "debug like" text to 
>the console (OS command line). The problem is that I don't have access  
>to the code (its probably a Win32 dll thats part of drag-n-drop in Tk).  
>
>How can I suppress STDOUT during certain function calls so the users of 
>my application don't see this stuff?

Open a filehandle to the nul: device (for Win32), then temporarily
change STDOUT so output goes there instead of to the console.  For
example,

  open my $nowhere_filehandle, '>nul'
    or die "Cannot open nul: device for write: $!";
  
  {
    local *STDOUT = $nowhere_filehandle;
    some_sub();
  }
  
  sub some_sub {
    print "This is a debug-like line of text emitted to STDOUT.\n"
  }

All bets are off if the sub is opening its own filehandle to the
console.


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

Date: Fri, 13 Apr 2001 18:25:15 +0200
From: Ingo Ciechowski <ciechowski@cis-computer.com>
Subject: howto access serial devices in Perl? / "minicom" light
Message-Id: <01HW.B6FCF50B005702E11A8560F0@News.CIS.DFN.DE>

I'd like to access some serial device on my linux box bidirectionally, but 
for some reason don't get connected to the device. Seems as if special 
precautions are required...


For now the program should simply output a couple of commands to /dev/modem 
and print out all replies on that line.



open (OUT, ">/dev/modem");
open (IN, ">/dev/modem");

print OUT "AT+FCLASS=8\n";

### for some reason it already stucks here :-((

print OUT "AT&L*\n";
print OUT "AT&E37*\n";

while(<IN>) {
        print $_;
        if(/RING/) {
                print OUT "ATA\n";
                print OUT "AT+VRX\n";
                $start = 1;
        }
        print FILE $_ if($start == 1);
}



Hopefully someone can point me into the right direction?


-- 

Ingo
ciechowski@cis-computer.com



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

Date: Fri, 13 Apr 2001 18:31:09 +0100
From: "Simon Flack" <news@simonflack.com>
Subject: Re: howto access serial devices in Perl? / "minicom" light
Message-Id: <9b7dca$82v1i$1@ID-83895.news.dfncis.de>

Hi Ingo,

CPAN is your friend.

Device::SerialPort will be what you want and there is also a
Win32::SerialPort for Windows users.

See http://search.cpan.org/search?mode=module&query=serialport

Regards
Simon


"Ingo Ciechowski" <ciechowski@cis-computer.com> wrote in message
news:01HW.B6FCF50B005702E11A8560F0@News.CIS.DFN.DE...
> I'd like to access some serial device on my linux box bidirectionally, but
> for some reason don't get connected to the device. Seems as if special
> precautions are required...
>
>
> For now the program should simply output a couple of commands to
/dev/modem
> and print out all replies on that line.
>
>
>
> open (OUT, ">/dev/modem");
> open (IN, ">/dev/modem");
>
> print OUT "AT+FCLASS=8\n";
>
> ### for some reason it already stucks here :-((
>
> print OUT "AT&L*\n";
> print OUT "AT&E37*\n";
>
> while(<IN>) {
>         print $_;
>         if(/RING/) {
>                 print OUT "ATA\n";
>                 print OUT "AT+VRX\n";
>                 $start = 1;
>         }
>         print FILE $_ if($start == 1);
> }
>
>
>
> Hopefully someone can point me into the right direction?
>
>
> --
>
> Ingo
> ciechowski@cis-computer.com
>




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

Date: Fri, 13 Apr 2001 15:59:18 +0000 (UTC)
From: RReidy@RadianceGroup.com (Ron Reidy)
Subject: HP Openview
Message-Id: <695794EBFD92D3119F52009027A8F4B668C6D0@mail.radiancegroup.com>

Hi,

I am writing some software for a client to perform unassisted backups and
database monitoring.  When problems arise, I need to notify the operations
staff in their datacent.  Is there a Perl module for writing to HP Openview?
Or any other command center monitors?

Thanks for your help/advice.

Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.

-- 
Posted from escher [206.168.64.7] (may be forged) 
via Mailgate.ORG Server - http://www.Mailgate.ORG


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

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 693
**************************************


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