[29323] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 567 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 24 03:10:07 2007

Date: Sun, 24 Jun 2007 00:09:11 -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           Sun, 24 Jun 2007     Volume: 11 Number: 567

Today's topics:
    Re: date parts in one step <tadmc@seesig.invalid>
    Re: How can I overload the build in array type? <ilias@lazaridis.com>
        new CPAN modules on Sun Jun 24 2007 (Randal Schwartz)
        Newbie Question <openlinuxsource@gmail.com>
    Re: Newbie Question <noreply@gunnar.cc>
    Re: Newbie Question <openlinuxsource@gmail.com>
    Re: Newbie Question <paduille.4061.mumia.w+nospam@earthlink.net>
    Re: Newbie Question <noreply@gunnar.cc>
    Re: Perl Best Practices - Code Formatting. <tadmc@seesig.invalid>
    Re: Perl Best Practices - Code Formatting. <Peter@PSDT.com>
    Re: The Modernization of Emacs <blmblm@myrealbox.com>
    Re: The Modernization of Emacs <eadmund42@NOSPAMgmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 23 Jun 2007 21:27:38 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: date parts in one step
Message-Id: <slrnf7rlkq.pt6.tadmc@tadmc30.sbcglobal.net>

Peter J. Holzer <hjp-usenet2@hjp.at> wrote:
> On 2007-06-22 11:46, Petr Vileta <stoupa@practisoft.cz> wrote:
>> Brad Baxter wrote:
>>> my ($m, $y) = map { $$_[0] + 1, $$_[1] + 1900 } [(localtime)[4,5]];
>>>
>> I debug it in Komodo and this solution do 2 steps
>
> Why is this a problem?


Because it was supposed to do a waltz instead?


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Sun, 24 Jun 2007 02:33:38 -0000
From:  Ilias Lazaridis <ilias@lazaridis.com>
Subject: Re: How can I overload the build in array type?
Message-Id: <1182652418.186959.178210@q69g2000hsb.googlegroups.com>

On Jun 23, 5:13 pm, Michael Carman <mjcar...@mchsi.com> wrote:
> On 6/22/2007 3:09 AM, Ilias Lazaridis wrote:
>
>
>
> > is there a similar module to overload the classes of build in types
> > (like array), something like:
>
> >     use typeoverload
> >         '@' => 'My::Array',
> >         '%' => 'My::Hash';
> >         # etc
> >     ...
>
> You can't overload sigils but you can use tie() to create your own
> implementation of the built in data types.
>
> Run "perldoc perltie" for more info.

this was mentioned in the other thread, too.

But it does not seem to be the construct I am searching for (I would
need a one-liner per module to activate the change, e.g. something
like "use oveloadarray".

The most important use case would be to enable array pointer creation

my $data  = []; # assigns an "My::Array" pointer
my $datah = {}; # assigns an "My::Hash" pointer

The direct "sigil overload" has 2nd priority:

my @data; # isa "My::Array"


 .

--
http://dev.lazaridis.com/lang/ticket/17





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

Date: Sun, 24 Jun 2007 04:42:10 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Jun 24 2007
Message-Id: <JK4IEA.1BvH@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.

Apache2-ASP-1.02
http://search.cpan.org/~johnd/Apache2-ASP-1.02/
Perl extension for ASP on mod_perl2. 
----
Apache2-ASP-1.03
http://search.cpan.org/~johnd/Apache2-ASP-1.03/
Perl extension for ASP on mod_perl2. 
----
Apache2-ASP-1.04
http://search.cpan.org/~johnd/Apache2-ASP-1.04/
Perl extension for ASP on mod_perl2. 
----
Apache2-ASP-1.05
http://search.cpan.org/~johnd/Apache2-ASP-1.05/
Perl extension for ASP on mod_perl2. 
----
Apache2-ASP-1.06
http://search.cpan.org/~johnd/Apache2-ASP-1.06/
Perl extension for ASP on mod_perl2. 
----
Apache2-ASP-1.07
http://search.cpan.org/~johnd/Apache2-ASP-1.07/
Perl extension for ASP on mod_perl2. 
----
App-Relate-0.02
http://search.cpan.org/~doom/App-Relate-0.02/
backend for "relate" script (filtered locate) 
----
DashProfiler-1.03
http://search.cpan.org/~timb/DashProfiler-1.03/
collect call count and timing data aggregated by context 
----
Data-PackageName-0.01
http://search.cpan.org/~phaylon/Data-PackageName-0.01/
OO handling of package name transformations 
----
Device-ScanShare-1.004
http://search.cpan.org/~leocharre/Device-ScanShare-1.004/
manage USERDIRTS.TXT ecopy file to manage scanner device options 
----
Digest-MD5-Reverse-1.2
http://search.cpan.org/~blwood/Digest-MD5-Reverse-1.2/
MD5 Reverse Lookup 
----
Geo-Coder-Google-0.03
http://search.cpan.org/~miyagawa/Geo-Coder-Google-0.03/
Google Maps Geocoding API 
----
JSON-XS-1.3
http://search.cpan.org/~mlehmann/JSON-XS-1.3/
JSON serialising/deserialising, done correctly and fast 
----
Lingua-Stem-0.83
http://search.cpan.org/~snowhare/Lingua-Stem-0.83/
Stemming of words 
----
Metadata-ByInode-1.16
http://search.cpan.org/~leocharre/Metadata-ByInode-1.16/
Extend metadata in relation to file's inode using a database. 
----
Test-GreaterVersion-0.003
http://search.cpan.org/~ggoldbach/Test-GreaterVersion-0.003/
Did you update the VERSION? 
----
Test-Run-0.0111
http://search.cpan.org/~shlomif/Test-Run-0.0111/
----
Test-Run-CmdLine-0.0106
http://search.cpan.org/~shlomif/Test-Run-CmdLine-0.0106/
Analyze tests from the command line using Test::Run 
----
Test-Run-Plugin-AlternateInterpreters-0.0104
http://search.cpan.org/~shlomif/Test-Run-Plugin-AlternateInterpreters-0.0104/
Define different interpreters for different test scripts with Test::Run. 
----
Test-Run-Plugin-ColorFileVerdicts-0.0103
http://search.cpan.org/~shlomif/Test-Run-Plugin-ColorFileVerdicts-0.0103/
make the file verdict ("ok", "NOT OK") colorful. 
----
Test-Run-Plugin-ColorSummary-0.0102
http://search.cpan.org/~shlomif/Test-Run-Plugin-ColorSummary-0.0102/
A Test::Run plugin that colors the summary. 
----
Text-Compare-1.03
http://search.cpan.org/~stro/Text-Compare-1.03/
Language sensitive text comparison 
----
Tk-HyperText-0.04
http://search.cpan.org/~kirsle/Tk-HyperText-0.04/
Create and manipulate ROText widgets which render HTML code. 
----
WWW-PlaceEngine-0.03
http://search.cpan.org/~kokogiko/WWW-PlaceEngine-0.03/
get PC's location information from PlaceEngine. 
----
WWW-Scraper-ISBN-LibUniIt_Driver-0.2
http://search.cpan.org/~lucha/WWW-Scraper-ISBN-LibUniIt_Driver-0.2/
----
Wx-GLCanvas-0.06
http://search.cpan.org/~mbarbon/Wx-GLCanvas-0.06/
interface to wxWidgets' OpenGL canvas 
----
XML-Filter-GenericChunk-0.07
http://search.cpan.org/~phish/XML-Filter-GenericChunk-0.07/
Base Class for SAX Filters parsing WellBallanced Chunks 
----
XML-LibXML-Iterator-1.01
http://search.cpan.org/~phish/XML-LibXML-Iterator-1.01/
XML::LibXML's Tree Iteration Class 
----
XML-LibXML-Iterator-1.02
http://search.cpan.org/~phish/XML-LibXML-Iterator-1.02/
XML::LibXML's Tree Iteration Class 
----
re-engine-PCRE-0.10
http://search.cpan.org/~avar/re-engine-PCRE-0.10/
Perl-compatible regular expression engine 


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: Sun, 24 Jun 2007 12:54:31 +0800
From: "Amy Lee" <openlinuxsource@gmail.com>
Subject: Newbie Question
Message-Id: <pan.2007.06.24.04.54.30.267675@gmail.com>

Hi,

I'm a perl newbie, and I face something I can't handle.

I make a small perl script to find the shell script, one of parts is like
this:

 ... ...

my $ROOT="/root"

print "Please enter the shell script name: ";
  my $ANSWER=<STDIN>;
  until (-e "$ROOT/$ANSWER")
  {
    print "Error: Couldn't find the specific shell script.\n";
    print "Please enter the shell script name: ";
    my $ANSWER=<STDIN>;
  }

 ... ...

In my root directory, there's a file called testlink script, when I input
the name testlink, it always shows that "Error: Couldn't find the specific
shell script.". And notice me to type again.

I don't know how to accomplish this function.

Thanks in advance~

Amy Lee


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

Date: Sun, 24 Jun 2007 07:16:44 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Newbie Question
Message-Id: <5e6d7bF3720riU1@mid.individual.net>

Amy Lee wrote:
> I make a small perl script to find the shell script, one of parts is like
> this:
> 
> ... ...
> 
> my $ROOT="/root"
> 
> print "Please enter the shell script name: ";
>   my $ANSWER=<STDIN>;

     chomp $ANSWER;

>   until (-e "$ROOT/$ANSWER")
>   {
>     print "Error: Couldn't find the specific shell script.\n";
>     print "Please enter the shell script name: ";
>     my $ANSWER=<STDIN>;

You don't want to my() declare here.

     $ANSWER = <STDIN>;
     chomp $ANSWER;

>   }

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Sun, 24 Jun 2007 13:55:38 +0800
From: "Amy Lee" <openlinuxsource@gmail.com>
Subject: Re: Newbie Question
Message-Id: <pan.2007.06.24.05.55.36.577711@gmail.com>

On Sun, 24 Jun 2007 07:16:44 +0200, Gunnar Hjalmarsson wrote:

> Amy Lee wrote:
>> I make a small perl script to find the shell script, one of parts is like
>> this:
>> 
>> ... ...
>> 
>> my $ROOT="/root"
>> 
>> print "Please enter the shell script name: ";
>>   my $ANSWER=<STDIN>;
> 
>      chomp $ANSWER;
> 
>>   until (-e "$ROOT/$ANSWER")
>>   {
>>     print "Error: Couldn't find the specific shell script.\n";
>>     print "Please enter the shell script name: ";
>>     my $ANSWER=<STDIN>;
> 
> You don't want to my() declare here.
> 
>      $ANSWER = <STDIN>;
>      chomp $ANSWER;
> 
>>   }

Thank you very much, but why I can't add my() declare in the "until"
function?

Amy Lee 


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

Date: Sun, 24 Jun 2007 05:54:14 GMT
From: "Mumia W." <paduille.4061.mumia.w+nospam@earthlink.net>
Subject: Re: Newbie Question
Message-Id: <aGnfi.490$zA4.400@newsread3.news.pas.earthlink.net>

On 06/23/2007 11:54 PM, Amy Lee wrote:
> Hi,
> 
> I'm a perl newbie, and I face something I can't handle.
> 
> I make a small perl script to find the shell script, one of parts is like
> this:
> 
> .... ...
> 
> my $ROOT="/root"
> 
> print "Please enter the shell script name: ";
>   my $ANSWER=<STDIN>;

chomp $ANSWER;

>   until (-e "$ROOT/$ANSWER")
>   {
>     print "Error: Couldn't find the specific shell script.\n";
>     print "Please enter the shell script name: ";
>     my $ANSWER=<STDIN>;
>   }
> 
> .... ...
> 
> In my root directory, there's a file called testlink script, when I input
> the name testlink, it always shows that "Error: Couldn't find the specific
> shell script.". And notice me to type again.
> 
> I don't know how to accomplish this function.
> 
> Thanks in advance~
> 
> Amy Lee

Probably there is a newline in $ANSWER that must be removed by chomp().


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

Date: Sun, 24 Jun 2007 08:27:52 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Newbie Question
Message-Id: <5e6hcoF37dqjuU1@mid.individual.net>

Amy Lee wrote:
> On Sun, 24 Jun 2007 07:16:44 +0200, Gunnar Hjalmarsson wrote:
>> Amy Lee wrote:
>>> I make a small perl script to find the shell script, one of parts is like
>>> this:
>>>
>>> ... ...
>>>
>>> my $ROOT="/root"
>>>
>>> print "Please enter the shell script name: ";
>>>   my $ANSWER=<STDIN>;
>>      chomp $ANSWER;
>>
>>>   until (-e "$ROOT/$ANSWER")
>>>   {
>>>     print "Error: Couldn't find the specific shell script.\n";
>>>     print "Please enter the shell script name: ";
>>>     my $ANSWER=<STDIN>;
>> You don't want to my() declare here.
>>
>>      $ANSWER = <STDIN>;
>>      chomp $ANSWER;
>>
>>>   }
> 
> Thank you very much, but why I can't add my() declare in the "until"
> function?

You can, but you probably don't want, since that would make $ANSWER in 
the until block a separate variable from the $ANSWER variable you 
declared outside the block.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Sat, 23 Jun 2007 21:22:43 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Perl Best Practices - Code Formatting.
Message-Id: <slrnf7rlbj.pt6.tadmc@tadmc30.sbcglobal.net>

Uri Guttman <uri@stemsystems.com> wrote:
>>>>>> "TM" == Tad McClellan <tadmc@seesig.invalid> writes:
>
>  TM> Uri Guttman <uri@stemsystems.com> wrote:
>  >> COME TO YAPC::HOUSTON AND I WILL GIVE A
>  >> PIECE OF MY MIND!!!!
>
>  TM> as if you had any to spare...
>
> i keep a spare mind in my wallet.


Oh. 

I heard that it had been lost.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Sun, 24 Jun 2007 04:43:51 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: Perl Best Practices - Code Formatting.
Message-Id: <pan.2007.06.24.04.43.50.806863@PSDT.com>

On Sat, 23 Jun 2007 16:40:31 +0000, Uri Guttman wrote:
> ARE YOU IMPLYING SOMETHING!!!??? COME TO YAPC::HOUSTON AND I WILL GIVE A
> PIECE OF MY MIND!!!!

Nah, you wouldn't give anything away at YAPC if you could flog it in the
auction.

"What am I bid for this next item, lot #27, a piece of Uri's mind, only
slightly used..."

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/



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

Date: 24 Jun 2007 01:09:32 GMT
From: blmblm@myrealbox.com <blmblm@myrealbox.com>
Subject: Re: The Modernization of Emacs
Message-Id: <5e5uicF30n9e0U3@mid.individual.net>

In article <85r6o3gkp0.fsf@lola.goethe.zz>, David Kastrup  <dak@gnu.org> wrote:
> nebulous99@gmail.com writes:

[ snip ]

> It appears that you still have not bothered educating yourself, years
> after you were pretty much universally derided in comp.text.tex for
> making a spectacle of your self-chosen ignorance.

Ah, I *thought* this discussion was starting to sound familiar.
"This is where I came in"?  

(Reverting to the original set of newsgroups on the purely selfish
grounds of not wanting to follow an additional newsgroup, comp.emacs,
in order to read any replies.)

-- 
B. L. Massingill
ObDisclaimer:  I don't speak for my employers; they return the favor.


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

Date: Sat, 23 Jun 2007 19:36:30 -0600
From: Robert Uhl <eadmund42@NOSPAMgmail.com>
Subject: Re: The Modernization of Emacs
Message-Id: <m3hcoy16ch.fsf@latakia.dyndns.org>

nebulous99@gmail.com writes:
>
> And both of them, though especially the latter, regarding what a
> feeping creature emacs is.

I like it.  Every new version has great new abilities.

> I don't suppose there's also a kitchen sink in there somewhere? Or is
> that just nethack?

Check out nethack.el <http://www.nongnu.org/nethack-el/>.  You can run
nethack within emacs.  This, of course, means that there _is_ a kitchen
sink within emacs (when it's running nethack within itself)...

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
I don't think the Java folks are nuts for what they've done.  I just
don't like how hard they make certain simple and important things.
                                                 --Kent M. Pitman


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

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


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