[29031] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 275 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 28 06:10:07 2007

Date: Wed, 28 Mar 2007 03:09:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 28 Mar 2007     Volume: 11 Number: 275

Today's topics:
    Re: any quick and dirty code out there <goodm2@netzero.net>
    Re: any quick and dirty code out there <goodm2@netzero.net>
    Re: any quick and dirty code out there <uri@stemsystems.com>
    Re: any quick and dirty code out there <bik.mido@tiscalinet.it>
    Re: Beginning OO help <paduille.4060.mumia.w+nospam@earthlink.net>
    Re: Beginning OO help <uri@stemsystems.com>
    Re: Beginning OO help (Jamie)
    Re: Event Handling? <rcaputo@pobox.com>
        how to set script vars in commadline <moosegoose.elvis@iinvaaliid.gmail.com>
        new CPAN modules on Wed Mar 28 2007 (Randal Schwartz)
    Re: parsing a tab delimited or CSV, but keep the delimi <check.sig@for.email.invalid>
        perl + script files from only one directory magne.nilsen@gmail.com
    Re: prototypes - use or not? <bik.mido@tiscalinet.it>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 27 Mar 2007 20:33:16 -0700
From: "=?iso-8859-1?B?TXIuRyAoQL9AKQ==?=" <goodm2@netzero.net>
Subject: Re: any quick and dirty code out there
Message-Id: <1175052796.309908.261020@l77g2000hsb.googlegroups.com>

On Mar 27, 12:56 pm, "it_says_BALLS_on_your forehead"
<simon.c...@fmr.com> wrote:
> On Mar 27, 2:45 pm, "Mr.G (@=BF@)" <goo...@netzero.net> wrote:
>
> > Hi, I have a form writen and up to the submit button is all that I can
> > go. Now what I need is a place where I can get some quick and dirty
> > cgi/peal code to collect the input. It's only two inputs (name and
> > zip) the name of the ACTION is called namezip.pl. But like I said that
> > is as far as I got.
> > Thanks in advance for  any help
>
> Check out the CGI module.
>
> http://search.cpan.org/~lds/CGI.pm-3.27/CGI.pm
>
> Pay particular attention to the param() method.

Thanks for a look at that code but mine is HTML input that passes it
on to cgi that will in turn give it to a perl program to make a file.



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

Date: 27 Mar 2007 20:34:39 -0700
From: "=?iso-8859-1?B?TXIuRyAoQL9AKQ==?=" <goodm2@netzero.net>
Subject: Re: any quick and dirty code out there
Message-Id: <1175052879.289991.140360@p77g2000hsh.googlegroups.com>

On Mar 27, 3:57 pm, Tad McClellan <t...@augustmail.com> wrote:
> Mr.G (@=BF@) <goo...@netzero.net> wrote:
> > Now what I need is a place where I can get some quick and dirty
> > cgi/peal code
>
> Then post to the peal newsgroup.
>
> --
>     Tad McClellan                          SGML consulting
>     t...@augustmail.com                   Perl programming
>     Fort Worth, Texas

sorry for the misspelling but cgi can also use the c lang. to pass it
to.



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

Date: Tue, 27 Mar 2007 22:52:29 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: any quick and dirty code out there
Message-Id: <x7abxykosi.fsf@mail.sysarch.com>

>>>>> "G" == G (@¿@) <goodm2@netzero.net> writes:

  G> On Mar 27, 3:57 pm, Tad McClellan <t...@augustmail.com> wrote:
  >> Mr.G (@¿@) <goo...@netzero.net> wrote:
  >> > Now what I need is a place where I can get some quick and dirty
  >> > cgi/peal code
  >> 
  >> Then post to the peal newsgroup.
  >> 
  >> --
  >> Tad McClellan                          SGML consulting
  >> t...@augustmail.com                   Perl programming
  >> Fort Worth, Texas

  G> sorry for the misspelling but cgi can also use the c lang. to pass it
  G> to.

cgi can use any language as it is an interface specification and not a
language specification. and your previous post made no sense either. why
would you run a perl cgi and then hand off to another perl script? you
don't seem to understand the basics of cgi and how perl (or any lang)
works with it. the cgi.pm module does what you want even if you say
otherwise. by using it you can get the params passed in from the browser
and do whatever you want with them.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Wed, 28 Mar 2007 11:29:55 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: any quick and dirty code out there
Message-Id: <lbdk031toc3th6tjeorclser2lhnnctg67@4ax.com>

On 27 Mar 2007 20:33:16 -0700, "Mr.G (@¿@)" <goodm2@netzero.net>
wrote:

>> Check out the CGI module.
>>
>> http://search.cpan.org/~lds/CGI.pm-3.27/CGI.pm
>>
>> Pay particular attention to the param() method.
>
>Thanks for a look at that code but mine is HTML input that passes it
>on to cgi that will in turn give it to a perl program to make a file.

Thus CGI.pm should be perfectly appropriate. Why do you think it
wouldn't?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Wed, 28 Mar 2007 01:40:45 GMT
From: "Mumia W." <paduille.4060.mumia.w+nospam@earthlink.net>
Subject: Re: Beginning OO help
Message-Id: <xIjOh.17219$tD2.504@newsread1.news.pas.earthlink.net>

On 03/27/2007 04:14 PM, Arvin Portlock wrote:
> I'm creating my very first object oriented module. I've read about
> objects in so many perl books and online tutorials, and yet I still
> can't get the hang of it. 

Read "perldoc perltoot":
Start->Run->"perldoc perltoot"

> It's very frustrating. I've started by
> designing a very simple class that has similar functionality to
> what I eventually want to come up with, but not nearly as complex.
> Just to get the hang of the basics before I get more complicated.
> The class encapsulates an XML file. It has two attributes: the
> file size and a linked list of the element names in the order they
> are encountered in the file. Use it like this:
> 
> use Pete::MyFirstClass;
> 
> my $xmldoc = new Pete::MyFirstClass ('filename.xml');
> 
> print "The size of the document is ", $xmldoc->size, "\n";
> print "Here is a list of the elements in the document:\n";
> 
> my $element = $xmldoc->elements;
> while ($element) {
>    print $element->{name}, "\n";
>    $element = $element->{next};
> }
> 
> __END__
> 
> Question 1: How do I turn {name} and {next} into accessor methods
> rather than raw hash values?
> 

Read "perldoc perltoot"

> Here's what I have so far:
> 
> package Pete::MyFirstClass;
> require Exporter;

In this program, it probably doesn't make any difference, but it's 
probably better usually to do "use Exporter;"


> @ISA = qw(Exporter);
> use strict 'vars';
> 
> sub new {
>    my ($self, $file) = @_;
>    my $size = -s $file;
>    my $elements = {};
>    my $last_element;
>    open (FILE, $file);
>    while (my $line = <FILE>) {
>       while ($line =~ /<([a-z0-9]+)[^<>]*>/g) { [...]

It's not a good idea to try to parse something as complicated as XML 
with regular expressions. Use one of the XML parsing modules instead.

After you've finished reading "perldoc perltoot," you can get an 
overview of the Perl documentation installed on your computer by reading 
"perldoc perl"


HTH


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

Date: Tue, 27 Mar 2007 21:26:11 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Beginning OO help
Message-Id: <x7lkhikssc.fsf@mail.sysarch.com>

>>>>> "AP" == Arvin Portlock <nomail@sorry.com> writes:

  AP> package Pete::MyFirstClass;
  AP> require Exporter;
  AP> @ISA = qw(Exporter);

why are you inheriting Exporter when you don't export anything? and in
pure OO modules you never export anything. 

  AP> use strict 'vars';

use strict ;

don't restrict only vars.

 
  AP>     while (my $line = <FILE>) {
  AP>        while ($line =~ /<([a-z0-9]+)[^<>]*>/g) {

parsing html with regexes is fraught with danger. use a parser.

  AP>           if ($elements) {
  AP>              $last_element->{next} = $tag;
  AP>              $last_element = $tag;
  AP>           } else {
  AP>              $elements = $tag;
  AP>              $last_element = $tag;
  AP>           }

you do the same assignment to $last_element in both clauses so factor
that outside the if/else.

  AP>     return bless [$size, $elements];

why are you using an array for an object? sure it works and can be a
trifle faster but it means you access object elements by number which is
not easily understood (see the pseudohash debacle for more on that).

as others have said you need to learn much more about OO perl. in fact
there is a book called object oriented perl and you should read
it. highly recommended by many perl hackers including myself
(disclaimer: i also was a tech editor of it). the perldocs on objects
and OO are also worth reading (in their ENTIRETY).

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Wed, 28 Mar 2007 04:04:14 GMT
From: nospam@geniegate.com (Jamie)
Subject: Re: Beginning OO help
Message-Id: <Lc1175030231219240x8c13258@pong.podro.com>

In <eubtv1$1j6f$1@agate.berkeley.edu>,
Arvin Portlock <nomail@sorry.com> mentions:
>I'm creating my very first object oriented module. I've read about
>objects in so many perl books and online tutorials, and yet I still
>can't get the hang of it. It's very frustrating. I've started by
>designing a very simple class that has similar functionality to
>what I eventually want to come up with, but not nearly as complex.
>Just to get the hang of the basics before I get more complicated.
>The class encapsulates an XML file. It has two attributes: the
>file size and a linked list of the element names in the order they
>are encountered in the file. Use it like this:

I know what you mean about the frustrating part, when I learned it,
I was making "more" out of it than was really there. 

No matter how they explained it, it wasn't till it hit me: 

It's just a reference. (or pointer, if you perfer)

>sub new {
>    my ($self, $file) = @_;
>    my $size = -s $file;
>    my $elements = {};
[snip]
>    close (FILE);
>    return bless [$size, $elements];
                   ^^^^^^^^^^^^^^^^^

Woah! that's probably a bit much to start out with. It's valid, but
you might want to start with a plain old hash first, just to get 
the feel for it.

I'll do some psuedo-code that might prove useful:

	# Procedural, no package, no nothing.
	sub constructor {
		my(%data) = (
			NAME => "John Henry"
		);
		return(\%data); # Return a non-magic, plain old reference.
	}
	sub get_name {
		my($data_ref) = shift;
		# Return the "instance variable" NAME. In other words: $data{NAME}
		return( $data_ref->{NAME} ); 
	}

	# "Objects" w/out objects.
	my $handle = construct();
	my $name = get_name($handle);


All an object really is, is a reference. Even in other languages, it's just a
pointer. Big woop. (I use pointer/reference to mean more or less the same
thing)

The language may attach special meaning to the reference, inheritance, etc.. but
at the end of the day, it's still just a reference, not unlike a file handle or
a key that relates to a record in a table some place. 

Ok, same thing, "objects", simple as possible:

	package Foo;
	sub constructor {
		my($this) = shift; 
		# $this is the package name, usually: ref($this) || $this
		my(%data) = (
			NAME => "John Henry"
		);
		bless(\%data,$this); # Tell perl to set the "smoke & mirrors" bit
		return($data);
	}
	sub get_name {
		my($self) = shift;
		return($self->{NAME}); # $data{NAME} by another name. A "fancy reference".
	}
	1;
	package main;
	my $object = Foo->constructor();
	$object->get_name();

Or, same general idea (but don't do this):

	my $object = &Foo::constructor('Foo');
	&Foo::get_name($object);


There is more to it than this, of course. But if you "unlearn" the business of
class variables, instance variables and other techno-babble, the stuff about
@INC and packages will come natural and everything will be clear, leaving
you with a feeling of... "that's it ?!?!?"

$object is just a reference to %data with sugar on top.

There is no need to call Exporter or any of that stuff. "objects" in perl
are actually easier than procedural code.

Jamie
-- 
http://www.geniegate.com                    Custom web programming
Perl * Java * UNIX                        User Management Solutions


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

Date: Wed, 28 Mar 2007 07:07:18 GMT
From: Rocco Caputo <rcaputo@pobox.com>
Subject: Re: Event Handling?
Message-Id: <slrnf0k51j.h4.rcaputo@eyrie.homenet>

On 27 Mar 2007 05:11:23 -0700, zm5 wrote:
> On Mar 26, 2:36 pm, "zm5" <ryanaro...@gmail.com> wrote:
>> Could someone give me a link to a tutorial on event handling in perl?
>> I have not been able to find anything, it seems what I always find
>> when searching for event handling in perl is signal handling. Are
>> these two things one in the same?
>>
>> Thanks for your help
>
> anyone?

Do you mean like in POE or Tk or something?

-- 
Rocco Caputo - http://poe.perl.org/


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

Date: Wed, 28 Mar 2007 08:24:36 GMT
From: "EN" <moosegoose.elvis@iinvaaliid.gmail.com>
Subject: how to set script vars in commadline
Message-Id: <1175070276.71836@xnews001>

Hi,

I have one script using evaled config files which has generated values 
using preset variables.
I want to keep preset vars out from config files and I don't want to put 
them in script.

But I really liked to define them in commandline when calling my script.

In config file "my.config" there could be a line like this:

$target_path=$root_path."\\droppings";

my script read and eval this config file but how to define $root_path?

Of course I could another evaled config file to set those vars

"myscript.pl -c preset_temp.config -c my.config"

, or write starter script, or use env vars.

I really like to do it like this:

"myscript.pl -v $root_path="hiway\\to\\hell" -c my.config"



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

Date: Wed, 28 Mar 2007 04:42:08 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Mar 28 2007
Message-Id: <JFLJq8.EHr@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

App-BackupAndRestore-0.01
http://search.cpan.org/~hooo/App-BackupAndRestore-0.01/
----
Audio-MPD-0.15.4
http://search.cpan.org/~jquelin/Audio-MPD-0.15.4/
Class for talking to MPD (Music Player Daemon) servers
----
Bio-Grep-v0.6.0
http://search.cpan.org/~limaone/Bio-Grep-v0.6.0/
Perl extension for searching in Fasta files
----
Bio-Phylo-0.16_RC4
http://search.cpan.org/~rvosa/Bio-Phylo-0.16_RC4/
Phylogenetic analysis using perl.
----
CGI-PathRequest-1.16
http://search.cpan.org/~leocharre/CGI-PathRequest-1.16/
get file info in a cgi environment
----
CGI-Portal-0.04
http://search.cpan.org/~alpo/CGI-Portal-0.04/
Extensible Framework for Multiuser Applications
----
CORBA-Python-0.34
http://search.cpan.org/~perrad/CORBA-Python-0.34/
----
DBIx-Class-DigestColumns-0.05000
http://search.cpan.org/~groditi/DBIx-Class-DigestColumns-0.05000/
Automatic digest columns
----
DBIx-Class-DigestColumns-0.06000
http://search.cpan.org/~groditi/DBIx-Class-DigestColumns-0.06000/
Automatic digest columns
----
Daemon-Generic-0.4
http://search.cpan.org/~muir/Daemon-Generic-0.4/
framework to provide start/stop/reload for a daemon
----
DateTime-Format-ISO8601-0.05
http://search.cpan.org/~jhoblitt/DateTime-Format-ISO8601-0.05/
Parses ISO8601 formats
----
Email-AddressParser-0.04
http://search.cpan.org/~awkay/Email-AddressParser-0.04/
RFC 2822 Address Parsing and Creation
----
Encode-First-0.01
http://search.cpan.org/~miyagawa/Encode-First-0.01/
Encode strings in a first possible encoding
----
ExtUtils-ModuleMaker-0.49
http://search.cpan.org/~jkeenan/ExtUtils-ModuleMaker-0.49/
Better than h2xs for creating modules
----
File-PathInfo-1.12
http://search.cpan.org/~leocharre/File-PathInfo-1.12/
access to path variables, stat data, misc info about a file
----
File-PathInfo-Ext-1.03
http://search.cpan.org/~leocharre/File-PathInfo-Ext-1.03/
metadata files, renaming, some other things on top of PathInfo
----
HTML-Template-Pluggable-0.16
http://search.cpan.org/~rhesa/HTML-Template-Pluggable-0.16/
Extends HTML::Template with plugin support
----
HTTP-Body-0.9
http://search.cpan.org/~agrundma/HTTP-Body-0.9/
HTTP Body Parser
----
IP-QQWry-v0.0.13
http://search.cpan.org/~sunnavy/IP-QQWry-v0.0.13/
a simple interface for QQWry IP database(file).
----
JSON-1.09
http://search.cpan.org/~makamaka/JSON-1.09/
parse and convert to JSON (JavaScript Object Notation).
----
LaTeX-Pod-0.12
http://search.cpan.org/~schubiger/LaTeX-Pod-0.12/
Transform LaTeX source files to POD (Plain old documentation)
----
Lemonldap-Handlers-Generic-3.1.2
http://search.cpan.org/~egerman/Lemonldap-Handlers-Generic-3.1.2/
Perl extension for Lemonldap sso system
----
Locale-Maketext-Gettext-1.20
http://search.cpan.org/~imacat/Locale-Maketext-Gettext-1.20/
Joins the gettext and Maketext frameworks
----
Net-ADNS-0.02
http://search.cpan.org/~salva/Net-ADNS-0.02/
Perl wrapper for the Asynchronous DNS client library
----
Net-ADNS-0.03
http://search.cpan.org/~salva/Net-ADNS-0.03/
Perl wrapper for the Asynchronous DNS client library
----
Net-SIP-0.25
http://search.cpan.org/~sullr/Net-SIP-0.25/
Framework SIP (Voice Over IP, RFC3261)
----
Params-CallbackRequest-1.17
http://search.cpan.org/~dwheeler/Params-CallbackRequest-1.17/
Functional and object-oriented callback architecture
----
Parse-QTEDI-0.02
http://search.cpan.org/~dongxu/Parse-QTEDI-0.02/
Parse QT/KDE preprocessed headers
----
Pugs-Compiler-Rule-0.22
http://search.cpan.org/~fglock/Pugs-Compiler-Rule-0.22/
Compiler for Perl 6 Rules
----
SVN-Notify-2.65
http://search.cpan.org/~dwheeler/SVN-Notify-2.65/
Subversion activity notification
----
Socialtext-Wikrad-0.03
http://search.cpan.org/~lukec/Socialtext-Wikrad-0.03/
efficient wiki browsing and editing
----
Template-Recall-0.03
http://search.cpan.org/~gilad/Template-Recall-0.03/
"Reverse callback" templating system
----
Term-Menu-0.06
http://search.cpan.org/~dazjorz/Term-Menu-0.06/
Perl extension for asking questions and printing menus at the terminal
----
Term-Menu-0.07
http://search.cpan.org/~dazjorz/Term-Menu-0.07/
Perl extension for asking questions and printing menus at the terminal
----
Tripletail-0.25
http://search.cpan.org/~hio/Tripletail-0.25/
Tripletail, Framework for Japanese Web Application
----
Tripletail-0.26
http://search.cpan.org/~hio/Tripletail-0.26/
Tripletail, Framework for Japanese Web Application
----
Tripletail-0.27
http://search.cpan.org/~hio/Tripletail-0.27/
Tripletail, Framework for Japanese Web Application
----
URI-ParseSearchString-2.1
http://search.cpan.org/~sden/URI-ParseSearchString-2.1/
parse Apache refferer logs and extract search engine query strings.
----
WWW-Autosite-1.08
http://search.cpan.org/~leocharre/WWW-Autosite-1.08/
support subroutines for autosite handlers, router, and misc cgi scripts
----
WWW-Mechanize-SpamCop-0.04
http://search.cpan.org/~adamowski/WWW-Mechanize-SpamCop-0.04/
SpamCop reporting automation.
----
overload-eval-0.01
http://search.cpan.org/~jjore/overload-eval-0.01/
Hooks the native string eval() function
----
overload-eval-0.02
http://search.cpan.org/~jjore/overload-eval-0.02/
Hooks the native string eval() function
----
overload-eval-0.03
http://search.cpan.org/~jjore/overload-eval-0.03/
Hooks the native string eval() function
----
overload-eval-0.04
http://search.cpan.org/~jjore/overload-eval-0.04/
Hooks the native string eval() function


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Wed, 28 Mar 2007 09:07:57 +0300
From: Alex <check.sig@for.email.invalid>
Subject: Re: parsing a tab delimited or CSV, but keep the delimiter
Message-Id: <cDnOh.25795$Rz.24519@reader1.news.saunalahti.fi>

Patricia Shanahan wrote:

> In this particular case, it was stated otherwise. From the base message
> of the thread: "I am cross posting this in the Perl and Java groups
> because, my implementation is in Java, but Perl users use regexp far
> more frequently."

I know what the OP said, and he's just stating that his implementation
is in Java. He's not saying that all the other solutions are useless.
Many of us are proficient in many languages and he might be able to
translate that solution or indeed use the language of the proposed
solution. In short: if you post in a Perl ng, you're going to get a Perl
answer. It's the same with other languages.

I'm done with this thread.

-- 
Alex
e-mail: Domain is iki dot fi. Local-part is alext.
        local-part at domain


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

Date: 28 Mar 2007 01:18:08 -0700
From: magne.nilsen@gmail.com
Subject: perl + script files from only one directory
Message-Id: <1175069888.178214.48340@y66g2000hsf.googlegroups.com>

Does anyone know if it is possible to configure perl (win) in such a
way that all necessary binary and script files can be run from a
single directory? I have an EXE+DLL+support files packer that can
totally wrap all its files and unpack and run them from a single exe,
as long as all needed files are in the same directory... I can accept
some real temp files being created in the temp directory, but I need
perl to run without having the \in \lib \script etc.etc
subdrectories... I 've seen what the PAR module can do, but that just
unpacks the total structure with subdirs to a temp area... which is
not what I am looking for. Alternatively, is there any alternative
"compilers" that truly compiles absolutely all needed files into a
single EXE ?

Magne



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

Date: Wed, 28 Mar 2007 11:35:59 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: prototypes - use or not?
Message-Id: <fidk03h1m8b6eqs0nn57bfqso6qsorlufi@4ax.com>

On Tue, 27 Mar 2007 16:52:19 -0400, "Dan Becker"
<dcbecker@nospam-alcatel-lucent.com> wrote:

>Perl Best Practices (Conway), section 9.10,  has a pretty clear statement 
>that subroutine prototypes should not be used. Period. (It says that the 
>disadvantages generally outweigh the limited advantages.) But it's still in 
>the language. So I'm confused. Is this generally accepted advice? or should 
>it be applied only in specific situations? or, generally speaking, avoided 
>in specific situations?

You may want to occasionally specify the empty prototype () and \@,
\%, &, which do special things (the latter only if it's the first one
IIRC, but I've never used it differently, and nver used much, to be
honest.)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 275
**************************************


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