[31116] in Perl-Users-Digest
Perl-Users Digest, Issue: 2361 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 23 03:09:41 2009
Date: Thu, 23 Apr 2009 00:09:08 -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 Thu, 23 Apr 2009 Volume: 11 Number: 2361
Today's topics:
Encode::decode() clears scalar being decoded? <urban@tru64.org>
Re: Encode::decode() clears scalar being decoded? <benkasminbullock@gmail.com>
Exiting given via next skendric@fhcrc.org
Re: Exiting given via next <someone@example.com>
Re: Exiting given via next sln@netherlands.com
Re: Exiting given via next <liarafan@xs4all.nl>
Re: Exiting given via next <uri@stemsystems.com>
Re: Exiting given via next <liarafan@xs4all.nl>
Re: How can I backreference a ?: group in perl regular sln@netherlands.com
Re: Is there a better way to convert foreign characters sln@netherlands.com
Re: Is there a better way to convert foreign characters <helmut@wollmersdorfer.at>
Re: Is there a better way to convert foreign characters <helmut@wollmersdorfer.at>
new CPAN modules on Thu Apr 23 2009 (Randal Schwartz)
Re: sudo perl script with environment variables on linu <haoniukun@gmail.com>
Re: sudo perl script with environment variables on linu <haoniukun@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 23 Apr 2009 02:08:24 +0200
From: Robert Urban <urban@tru64.org>
Subject: Encode::decode() clears scalar being decoded?
Message-Id: <gsobho$6e8$02$3@news.t-online.com>
if I run the following script:
-snip-
#!/usr/bin/perl
use Encode qw/decode/;
my $string = "B\303\266rsen Feiertag";
print "string=[$string]\n";
my $tmp = decode('utf8', $string, 1);
print "string=[$string], tmp=[$tmp]\n";
-snip-
I get the following output:
-snip-
string=[B鰎sen Feiertag]
string=[], tmp=[B?sen Feiertag]
-snip-
What happened to $string? There is no mention of side-effects in the Encode
manpage... This only happens when CHECK is set to 1.
I get this behavior on v5.8.8 running on:
- This is perl, v5.10.0 built for i386-linux-thread-multi
- This is perl, v5.8.8 built for i386-openbsd
cheers,
Rob Urban
------------------------------
Date: 23 Apr 2009 02:41:00 GMT
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: Encode::decode() clears scalar being decoded?
Message-Id: <49efd53c$0$733$c5fe31e7@read01.usenet4all.se>
On Thu, 23 Apr 2009 02:05:14 +0200, Robert Urban wrote:
> if I run the following script:
>
> -snip-
> #!/usr/bin/perl
>
> use Encode qw/decode/;
>
> my $string = "B\303\266rsen Feiertag";
> print "string=[$string]\n";
>
> my $tmp = decode('utf8', $string, 1);
> print "string=[$string], tmp=[$tmp]\n";
> -snip-
>
> I get the following output:
>
> -snip-
> string=[B枚rsen Feiertag]
> string=[], tmp=[B?sen Feiertag]
> -snip-
I get the same result.
I think it's a bug in Encode.
------------------------------
Date: Wed, 22 Apr 2009 15:49:43 -0700 (PDT)
From: skendric@fhcrc.org
Subject: Exiting given via next
Message-Id: <8dee7756-df71-43a0-a50a-aab217002beb@b6g2000pre.googlegroups.com>
i'm fond of constructs like the following:
use Switch;
LINE:
while (my $line = <$fh>) {
switch ($line) {
case /Shrill and clear he crowed/ {
say 'shrill';
$count++;
next LINE;
}
case /Recking nothing of wizardry/ {
say 'recking';
$count++;
next LINE;
}
else {
next LINE;
}
}
}
but, switch has a memory leak (http://rt.cpan.org/Public/Bug/
Display.html?id=45232), which makes it unsuitable for sitting inside
loops which iterate many times
the new switch statement in perl-5.10.0 does not have this memory
leak:
use feature 'switch';
LINE:
given ($line) {
when (/Shrill and clear he crowed/) {
say 'shrill';
$count++;
next LINE;
}
when (/Recking nothing of wizardry/) {
say 'recking';
$count++;
next LINE;
}
default {
next LINE;
}
}
however, the 'switch' feature doesn't like seeing 'next':
gnat> ./daily-syslog-extracts
Parsing logfile...
Exiting when via next at ./daily-syslog-extracts line 179, <GEN0> line
7.
Exiting given via next at ./daily-syslog-extracts line 179, <GEN0>
line 7.
Exiting when via next at ./daily-syslog-extracts line 179, <GEN0> line
12.
Exiting given via next at ./daily-syslog-extracts line 179, <GEN0>
line 12.
[...]
is there some way to persuade the new 'switch' feature to tolerate
'next' statements? or at least to be quiet about its displeasure?
[i can fall back to a cascaded if/elsif structure ... but i find
'switch' cleaner to read, so much so that i'm having trouble letting
go of it]
--sk
stuart kendrick
fhcrc
------------------------------
Date: Wed, 22 Apr 2009 16:09:47 -0700
From: "John W. Krahn" <someone@example.com>
Subject: Re: Exiting given via next
Message-Id: <4tNHl.97479$%k2.7559@newsfe07.iad>
skendric@fhcrc.org wrote:
> i'm fond of constructs like the following:
>
> use Switch;
> LINE:
> while (my $line = <$fh>) {
> switch ($line) {
> case /Shrill and clear he crowed/ {
> say 'shrill';
> $count++;
> next LINE;
> }
> case /Recking nothing of wizardry/ {
> say 'recking';
> $count++;
> next LINE;
> }
> else {
> next LINE;
> }
> }
> }
>
> but, switch has a memory leak (http://rt.cpan.org/Public/Bug/
> Display.html?id=45232), which makes it unsuitable for sitting inside
> loops which iterate many times
>
> the new switch statement in perl-5.10.0 does not have this memory
> leak:
>
> use feature 'switch';
> LINE:
> given ($line) {
> when (/Shrill and clear he crowed/) {
> say 'shrill';
> $count++;
> next LINE;
> }
> when (/Recking nothing of wizardry/) {
> say 'recking';
> $count++;
> next LINE;
> }
> default {
> next LINE;
> }
> }
>
> however, the 'switch' feature doesn't like seeing 'next':
>
> gnat> ./daily-syslog-extracts
> Parsing logfile...
> Exiting when via next at ./daily-syslog-extracts line 179, <GEN0> line
> 7.
> Exiting given via next at ./daily-syslog-extracts line 179, <GEN0>
> line 7.
> Exiting when via next at ./daily-syslog-extracts line 179, <GEN0> line
> 12.
> Exiting given via next at ./daily-syslog-extracts line 179, <GEN0>
> line 12.
> [...]
>
>
> is there some way to persuade the new 'switch' feature to tolerate
> 'next' statements? or at least to be quiet about its displeasure?
>
> [i can fall back to a cascaded if/elsif structure ... but i find
> 'switch' cleaner to read, so much so that i'm having trouble letting
> go of it]
given/when/default is not a loop construct, just as if/unless/elsif/else
is not. next/last/redo will only work properly from inside a loop.
Perhaps you want to use *goto* instead?
John
--
Those people who think they know everything are a great
annoyance to those of us who do. -- Isaac Asimov
------------------------------
Date: Wed, 22 Apr 2009 16:10:24 -0700
From: sln@netherlands.com
Subject: Re: Exiting given via next
Message-Id: <fp8vu454r96p75a01jhqqog9pnbdrcqsod@4ax.com>
On Wed, 22 Apr 2009 15:49:43 -0700 (PDT), skendric@fhcrc.org wrote:
>i'm fond of constructs like the following:
>
>use Switch;
>LINE:
>while (my $line = <$fh>) {
> switch ($line) {
> case /Shrill and clear he crowed/ {
> say 'shrill';
> $count++;
> next LINE;
> }
> case /Recking nothing of wizardry/ {
> say 'recking';
> $count++;
> next LINE;
> }
> else {
> next LINE;
> }
> }
>}
>
>but, switch has a memory leak (http://rt.cpan.org/Public/Bug/
>Display.html?id=45232), which makes it unsuitable for sitting inside
>loops which iterate many times
>
>the new switch statement in perl-5.10.0 does not have this memory
>leak:
>
>use feature 'switch';
>LINE:
while (my $line = <$fh>) {
>given ($line) {
> when (/Shrill and clear he crowed/) {
> say 'shrill';
> $count++;
> next LINE;
> }
I don't have 5.10 , does given() replace the
while ($line = <$fh>) {
?
Otherwise, it might be infinite loop thing.
-sln
------------------------------
Date: Thu, 23 Apr 2009 07:59:49 +0200
From: "Mark" <liarafan@xs4all.nl>
Subject: Re: Exiting given via next
Message-Id: <tL2dnWGgd_9Jnm3UnZ2dnUVZ8sidnZ2d@giganews.com>
"John W. Krahn" <someone@example.com> wrote in message
news:4tNHl.97479$%k2.7559@newsfe07.iad...
> given/when/default is not a loop construct, just as if/unless/elsif/
> else is not. next/last/redo will only work properly from inside a loop.
His:
>> while (my $line = <$fh>) {
IS a loop; a simple 'next;' (not 'next LINE;' per se) should be enough
to get the outer ''while' loop going (if the condition is still true, of
course).
- Mark
------------------------------
Date: Thu, 23 Apr 2009 02:14:52 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Exiting given via next
Message-Id: <87tz4fsxpf.fsf@quad.sysarch.com>
>>>>> "M" == Mark <liarafan@xs4all.nl> writes:
M> His:
>>> while (my $line = <$fh>) {
M> IS a loop; a simple 'next;' (not 'next LINE;' per se) should be enough
M> to get the outer ''while' loop going (if the condition is still true, of
M> course).
but that was using the Switch module (which is evil since it does source
filtering). his second case using the 5.10 switch feature (built in and
not a source filter) didn't have a loop. he was wondering why next
didn't work inside the given. the answer (which is correct) is that
given is not a loop construct. if it was wrapped in a while as in the
first example, next would work.
> use feature 'switch';
> LINE:
> given ($line) {
> when (/Shrill and clear he crowed/) {
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Thu, 23 Apr 2009 08:19:37 +0200
From: "Mark" <liarafan@xs4all.nl>
Subject: Re: Exiting given via next
Message-Id: <MJadnRsJY4LrlW3UnZ2dnUVZ8sKdnZ2d@giganews.com>
"Uri Guttman" <uri@stemsystems.com> wrote in message
news:87tz4fsxpf.fsf@quad.sysarch.com...
>>>>>> "M" == Mark <liarafan@xs4all.nl> writes:
>
> M> His:
>
> >>> while (my $line = <$fh>) {
>
> M> IS a loop; a simple 'next;' (not 'next LINE;' per se) should be
> M> enough to get the outer ''while' loop going (if the condition is still
> M> true, of course).
>
> but that was using the Switch module (which is evil since it does source
> filtering). his second case using the 5.10 switch feature (built in and
> not a source filter) didn't have a loop.
Oops. Missed that one. :) You're right, of course.
- Mark
------------------------------
Date: Wed, 22 Apr 2009 15:11:00 -0700
From: sln@netherlands.com
Subject: Re: How can I backreference a ?: group in perl regular expression?
Message-Id: <go4vu4pvafqt6gj1b8g0purhpc1bdjle9t@4ax.com>
On Mon, 20 Apr 2009 11:05:48 -0700 (PDT), kun niu <haoniukun@gmail.com> wrote:
>On 4月21日, 上午12时50分, Ben Morrow <b...@morrow.me.uk> wrote:
>> Quoth kun niu <haoniu...@gmail.com>:
>>
>> > Dear all,
>> > My question is listed as title.
>> > I want to use strings like \1,\2 etc to represent the group matched
>> > last time.
>> > But the group is not captured, as signed by ?:.
>> > Can I implement this in perl?
>>
>> No. That, in fact, is the whole point of (?:) groups.
>>
>> Why do you think you need to do this?
>>
>> Ben
>
>Thank you for your attention to my question and your precious time.
>In my application, I'll have reformat the telephone number in my
>company.
>Since they came from all over the world, we have various telephone
>format.
>Here's some examples:
>000-000-000
>(00)00-000-0000
>!00!00-000-0000
>0000000
>0000-0000
>0000 0000 000
>you dont care
>What my job is to check the valid telephone number and to give them
>out.
>In case that I meet a ')' character, I'll have to check if there's a
>'(' in the front.
>'!' is also valid here.
>But all these characters should not be captured.
>So I'll have to backreference a previous group
>Expression like "((?:[!|]*)\d+\1\d+)" gives a bad result.
>Any further hints or advice here?
>Thanks again for your reply.
Although your not too clear about your intent,
it is obvious you *think* you can capture individual numbers
in groups, shed surrounding delimeters, validate special delemeters
(one of which is paranthetical closures) then wrap it all up and
stamp it "Special Delivery" for an array.
I dunno, maybe, but if not, an approach like this might get you started.
(this goes into my bin for future reference, if any)
-sln
---------------------------
## ph_capt.pl
##
use strict;
use warnings;
my $str = <<TELNUMS;
phone numbers:
100-junk-(00)
200-000-000-!99!
(30)-00-000-0000
!40!00-000-0000-
5000000
6000-0000
7000 0000 000
!80)-00-000-0000
TELNUMS
print $str;
my @ar = "!40!00-000-0000" =~
/^ # line start
( # begin capture group 1 ($1)
!\d+! # '!' + 1 or more digits + '!'
| # or
\(\d+\) # '(' + 1 or more digits + ')'
| # or
# defined-empty string
) # end group 1
[ \t-]* # 0 or more of these chars
( # begin capture group 2 ($2)
(?: # grouping
\d+[ \t-]* # 1 or more digits + 0 or more of these chars
)+ # end group, do 1 or more times
) # end group 2
$ # line end
/x;
print "\n-------------\n\n";
print "'$_'\n" for (@ar);
print "\n-------------\n\n";
for (split /\n/,$str)
{
next if (!length());
print "Target: '$_'\n";
if ( @ar = /^(!\d+!|\(\d+\)|)[ \t-]*((?:\d+[ \t-]*)+)$/ )
{
my @ngroups = split /[ \t-]/, $ar[1];
$ar[0] =~ s/[!()]//g;
print " ++ matched ". join (' , ',@ngroups) ."\n";
print " special prefix $ar[0]\n" if length $ar[0];
}
else {
print " -- invalid phone #\n";
}
print "\n";
}
__END__
Output:
phone numbers:
100-junk-(00)
200-000-000-!99!
(30)-00-000-0000
!40!00-000-0000-
5000000
6000-0000
7000 0000 000
!80)-00-000-0000
-------------
'!40!'
'00-000-0000'
-------------
Target: 'phone numbers:'
-- invalid phone #
Target: '100-junk-(00)'
-- invalid phone #
Target: '200-000-000-!99!'
-- invalid phone #
Target: '(30)-00-000-0000'
++ matched 00 , 000 , 0000
special prefix 30
Target: '!40!00-000-0000-'
++ matched 00 , 000 , 0000
special prefix 40
Target: '5000000'
++ matched 5000000
Target: '6000-0000'
++ matched 6000 , 0000
Target: '7000 0000 000'
++ matched 7000 , 0000 , 000
Target: '!80)-00-000-0000'
-- invalid phone #
------------------------------
Date: Wed, 22 Apr 2009 16:03:23 -0700
From: sln@netherlands.com
Subject: Re: Is there a better way to convert foreign characters?
Message-Id: <j67vu4l7fl5df6sd9fn5na4el8mei10f9u@4ax.com>
On Wed, 22 Apr 2009 20:45:32 GMT, Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:
>On 2009-04-22, bugbear <bugbear@trim_papermule.co.uk_trim> wrote:
>
>> Unicode only helps with representation of data; manipulation
>> is still down to the application.
>
>I strongly disagree. Unicode has its weak points, but it is still
>incomparably better that any scheme a Joe Xispack would invent
>herself.... Witness the disaster with Emacs Internationalization.
>
>Just:
>
> existence of the notion of "Unicode character",
>
> a possibility of specifying a character unambiguously (with some
> minor hair-splitting needed sometimes, as in o-trema vs o-umlaut, or
> in CJK), and
>
> having a list of "property" *names* (which is, basically, the
> information about how other people look at individual characters)
>
>should be, IMO, an enormous help in the design of what you call
>"manipulations". And I did not even touch "tables", i.e., the *values*
>of these properties: it is a major work in itself...
>
>Yours,
>Ilya
Unicode is a nightmare. Encoding 1-6 bytes (or more) to represent the
whole range of possible multiple code rendering(s) of character(s) of all
the languages in the world is just out of control.
Internal data manipulation is a nightmare, a hog, and slow as hell.
Is it a byte, a word, int or more? 0 .. (2**32-1) or more! Optimizations?
Encode/Decoding, back and forth. Just a nightmare. And what is it, what
is the encoding of that? Dunno, take a guess! "L,that sucks man!";
Unicode, the expression of everything that does nothing (good).
-sln
------------------------------
Date: Thu, 23 Apr 2009 08:37:04 +0200
From: Helmut Wollmersdorfer <helmut@wollmersdorfer.at>
Subject: Re: Is there a better way to convert foreign characters?
Message-Id: <gsp2dh$28e1$1@geiz-ist-geil.priv.at>
Ilya Zakharevich wrote:
[Unicode]
> a possibility of specifying a character unambiguously (with some
> minor hair-splitting needed sometimes, as in o-trema vs o-umlaut, or
> in CJK), and
... can not decompose 'overlay diacritics' like l-stroke or o-stroke
> having a list of "property" *names* (which is, basically, the
> information about how other people look at individual characters)
e.g. distinguish 'confusables' like cyr-A versus latin-A
> should be, IMO, an enormous help in the design of what you call
> "manipulations". And I did not even touch "tables", i.e., the *values*
> of these properties: it is a major work in itself...
Of course. Matching Unicode properties may be slow, but it's far better
than maintaining a table myself (for a language or script I do not know).
Also the tables in Unicode locales are a great work, very incomplete
(e.g. transliteration), but save time in some other topics.
Helmut Wollmersdorfer
------------------------------
Date: Thu, 23 Apr 2009 09:01:53 +0200
From: Helmut Wollmersdorfer <helmut@wollmersdorfer.at>
Subject: Re: Is there a better way to convert foreign characters?
Message-Id: <gsp3s3$28r6$1@geiz-ist-geil.priv.at>
sln@netherlands.com wrote:
> Unicode is a nightmare.
Writing systems of the world are a nightmare. Unicode just documents them.
> Encoding 1-6 bytes (or more) to represent the
> whole range of possible multiple code rendering(s) of character(s) of all
> the languages in the world is just out of control.
Unicode defines a character *set* not a character *encoding*.
> Internal data manipulation is a nightmare, a hog, and slow as hell.
I disagree. Maybe slow, if you use property matching in Perl5.
> Is it a byte, a word, int or more? 0 .. (2**32-1) or more!
It is a character - nice to handle in Perl 5.8.
> Encode/Decoding, back and forth.
Every system needs encode/decode between internal and external
representation of characters, if encodings differ. If your Perl programs
are well designed, you need it just in one place - in the open statement.
> Just a nightmare. And what is it, what
> is the encoding of that?
That's the problem which Unicode helps to solve. There are hundreds of
non-Unicode encodings in the wild, some very exotic like
7-bit-ASCII-German, some undocumented.
> Unicode, the expression of everything that does nothing (good).
It's your responsibility to use it in a good or bad way.
Helmut Wollmersdorfer
------------------------------
Date: Thu, 23 Apr 2009 04:42:30 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu Apr 23 2009
Message-Id: <KIJEEu.DIv@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-AuthCASSimple-0.08
http://search.cpan.org/~yvesago/Apache2-AuthCASSimple-0.08/
Apache2 module to authentificate trough a CAS server
----
Apache2-AuthCASSimple-0.09
http://search.cpan.org/~yvesago/Apache2-AuthCASSimple-0.09/
Apache2 module to authentificate trough a CAS server
----
Apache2-WURFLFilter-1.54
http://search.cpan.org/~ifuschini/Apache2-WURFLFilter-1.54/
is a Apache Mobile Filter that manage content (text & image) to the correct mobile device
----
Astro-SpaceTrack-0.040
http://search.cpan.org/~wyant/Astro-SpaceTrack-0.040/
Retrieve orbital data from www.space-track.org.
----
Audio-Scan-0.11
http://search.cpan.org/~agrundma/Audio-Scan-0.11/
Fast C parser for MP3, Ogg Vorbis, FLAC, ASF, WAV
----
Bot-BasicBot-Pluggable-Module-Eliza-0.04
http://search.cpan.org/~mdom/Bot-BasicBot-Pluggable-Module-Eliza-0.04/
Eliza for Bot::BasicBot::Pluggable
----
Business-OnlinePayment-Protx-0.05
http://search.cpan.org/~wreis/Business-OnlinePayment-Protx-0.05/
Protx backend for Business::OnlinePayment
----
Cairo-CuttingLine-0.04
http://search.cpan.org/~cornelius/Cairo-CuttingLine-0.04/
draw cutting line to cairo surface
----
Catalyst-Devel-1.11
http://search.cpan.org/~mramberg/Catalyst-Devel-1.11/
Catalyst Development Tools
----
Catalyst-View-Component-SubInclude-0.05
http://search.cpan.org/~nilsonsfj/Catalyst-View-Component-SubInclude-0.05/
Use subincludes in your Catalyst views
----
Class-C3-Adopt-NEXT-0.08
http://search.cpan.org/~flora/Class-C3-Adopt-NEXT-0.08/
make NEXT suck less
----
Class-C3-Componentised-1.0005
http://search.cpan.org/~ash/Class-C3-Componentised-1.0005/
----
Class-Implant-0.02_02
http://search.cpan.org/~shelling/Class-Implant-0.02_02/
Manipulating mixin and inheritance out of packages
----
Config-Properties-1.70
http://search.cpan.org/~salva/Config-Properties-1.70/
Read and write property files
----
Crypt-Eksblowfish-0.007
http://search.cpan.org/~zefram/Crypt-Eksblowfish-0.007/
the Eksblowfish block cipher
----
DBD-SQLite-1.24_02
http://search.cpan.org/~adamk/DBD-SQLite-1.24_02/
Self-contained RDBMS in a DBI Driver
----
Data-ID-Exim-0.006
http://search.cpan.org/~zefram/Data-ID-Exim-0.006/
generate Exim message IDs
----
Data-Transform-0.06
http://search.cpan.org/~martijn/Data-Transform-0.06/
base class for protocol abstractions
----
Data-Transform-SSL-0.02
http://search.cpan.org/~martijn/Data-Transform-SSL-0.02/
SSL in a filter
----
DateTime-Format-Flexible-0.07
http://search.cpan.org/~thinc/DateTime-Format-Flexible-0.07/
DateTime::Format::Flexible - Flexibly parse strings and turn them into DateTime objects.
----
DateTime-TimeZone-HPUX-0.04
http://search.cpan.org/~dolmen/DateTime-TimeZone-HPUX-0.04/
Handles timezones defined at the operating system level on HP-UX
----
Devel-BindPP-0.04
http://search.cpan.org/~tokuhirom/Devel-BindPP-0.04/
bind c++ to perl
----
Devel-CheckOS-1.6
http://search.cpan.org/~dcantrell/Devel-CheckOS-1.6/
check what OS we're running on
----
Elive-0.08
http://search.cpan.org/~warringd/Elive-0.08/
Elluminate Live (c) client library
----
File-Which-Cached-1.03
http://search.cpan.org/~leocharre/File-Which-Cached-1.03/
faster subsequent which lookups
----
Foorum-1.000008
http://search.cpan.org/~fayland/Foorum-1.000008/
forum system based on Catalyst
----
Git-PurePerl-0.41
http://search.cpan.org/~lbrocard/Git-PurePerl-0.41/
A Pure Perl interface to Git repositories
----
HTML-Perlinfo-1.59
http://search.cpan.org/~accardo/HTML-Perlinfo-1.59/
Display a lot of Perl information in HTML format
----
HTML-Widget-JavaScript-0.02
http://search.cpan.org/~nilsonsfj/HTML-Widget-JavaScript-0.02/
Adds JavaScript validation to HTML::Widget
----
Hessian-Client-0.1.15
http://search.cpan.org/~heytrav/Hessian-Client-0.1.15/
RPC via Hessian with a remote server.
----
IO-AIO-3.19
http://search.cpan.org/~mlehmann/IO-AIO-3.19/
Asynchronous Input/Output
----
Jifty-Plugin-YouTube-0.01
http://search.cpan.org/~cornelius/Jifty-Plugin-YouTube-0.01/
YouTube Plugin
----
JiftyX-CloudTags-0.01
http://search.cpan.org/~cornelius/JiftyX-CloudTags-0.01/
----
LEOCHARRE-Dir-1.07
http://search.cpan.org/~leocharre/LEOCHARRE-Dir-1.07/
subs for dirs
----
Math-RPN-1.09
http://search.cpan.org/~szabgab/Math-RPN-1.09/
Perl extension for Reverse Polish Math Expression Evaluation
----
MooseX-Types-VariantTable-0.02
http://search.cpan.org/~flora/MooseX-Types-VariantTable-0.02/
Type constraint based variant table
----
Net-FTP-File-0.06
http://search.cpan.org/~dmuey/Net-FTP-File-0.06/
Perl extension for simplifying FTP file operations.
----
Net-LastFM-Submission-0.61
http://search.cpan.org/~sharifuln/Net-LastFM-Submission-0.61/
Perl interface to the Last.fm Submissions Protocol
----
Net-LastFM-Submission-0.62
http://search.cpan.org/~sharifuln/Net-LastFM-Submission-0.62/
Perl interface to the Last.fm Submissions Protocol
----
Number-Phone-1.7002
http://search.cpan.org/~dcantrell/Number-Phone-1.7002/
base class for Number::Phone::* modules
----
OSType-0.003
http://search.cpan.org/~dagolden/OSType-0.003/
Map operating system names to generic types or families
----
POE-Component-Client-Icecast-0.11
http://search.cpan.org/~sharifuln/POE-Component-Client-Icecast-0.11/
non-blocking client to Icecast server for getting tags
----
POE-Component-SmokeBox-Dists-1.00
http://search.cpan.org/~bingos/POE-Component-SmokeBox-Dists-1.00/
Search for CPAN distributions by cpanid or distribution name
----
Padre-Plugin-SpellCheck-1.0.0
http://search.cpan.org/~jquelin/Padre-Plugin-SpellCheck-1.0.0/
check spelling in Padre
----
Parley-1.1.0
http://search.cpan.org/~chisel/Parley-1.1.0/
Message board / forum application
----
Religion-Bible-Regex-Builder-0.9
http://search.cpan.org/~holmlund/Religion-Bible-Regex-Builder-0.9/
builds regular expressions that match Bible References
----
SSH-Batch-0.004
http://search.cpan.org/~agent/SSH-Batch-0.004/
Cluster operations based on parallel SSH, set and interval arithmetic
----
SSH-Batch-0.005
http://search.cpan.org/~agent/SSH-Batch-0.005/
Cluster operations based on parallel SSH, set and interval arithmetic
----
SSH-Batch-0.006
http://search.cpan.org/~agent/SSH-Batch-0.006/
Cluster operations based on parallel SSH, set and interval arithmetic
----
SSH-Batch-0.007
http://search.cpan.org/~agent/SSH-Batch-0.007/
Cluster operations based on parallel SSH, set and interval arithmetic
----
SSH-Batch-0.008
http://search.cpan.org/~agent/SSH-Batch-0.008/
Cluster operations based on parallel SSH, set and interval arithmetic
----
SSH-Batch-0.009
http://search.cpan.org/~agent/SSH-Batch-0.009/
Cluster operations based on parallel SSH, set and interval arithmetic
----
Set-Relation-0.10.0
http://search.cpan.org/~duncand/Set-Relation-0.10.0/
Relation data type for Perl
----
Syntax-Highlight-Perl6-0.042
http://search.cpan.org/~azawawi/Syntax-Highlight-Perl6-0.042/
Perl 6 Syntax Highlighter
----
Test-XT-0.02
http://search.cpan.org/~adamk/Test-XT-0.02/
Generate best practice author tests
----
Text-Template-Simple-0.62_15
http://search.cpan.org/~burak/Text-Template-Simple-0.62_15/
Simple text template engine
----
Time-Elapsed-0.27
http://search.cpan.org/~burak/Time-Elapsed-0.27/
Displays the elapsed time as a human readable string.
----
URI-geo-0.02
http://search.cpan.org/~andya/URI-geo-0.02/
The geo URI scheme.
----
URI-geo-0.03
http://search.cpan.org/~andya/URI-geo-0.03/
The geo URI scheme.
----
URI-geo-0.04
http://search.cpan.org/~andya/URI-geo-0.04/
The geo URI scheme.
----
namespace-autoclean-0.04
http://search.cpan.org/~flora/namespace-autoclean-0.04/
Keep imports out of your namespace
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/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Wed, 22 Apr 2009 18:50:13 -0700 (PDT)
From: kun niu <haoniukun@gmail.com>
Subject: Re: sudo perl script with environment variables on linux
Message-Id: <7e78605c-6919-4e88-9616-291e25b4007c@z16g2000prd.googlegroups.com>
On 4=D4=C223=C8=D5, =C9=CF=CE=E712=CA=B118=B7=D6, powah <wong_po...@yahoo.c=
a> wrote:
> How to use sudo to run a perl script with the environment variable
> JAVA_HOME on linux?
> Running testenv.pl as sudo do not pickup the environment variable
> JAVA_HOME
> value.
>
> $ echo $JAVA_HOME
> /home/powah/jdk1.6.0_13
>
> testenv.pl is:
> #!/usr/bin/perl
> print "begin JAVA_HOME =3D $JAVA_HOME\n";
> $J_HOME =3D $ENV{'JAVA_HOME'};
> print "$ENV{'JAVA_HOME'} JAVA_HOME =3D $J_HOME\n";
>
> $ perl testenv.pl
> begin JAVA_HOME =3D
> /home/powah/jdk1.6.0_13 JAVA_HOME =3D /home/powah/jdk1.6.0_13
>
> $ sudo perl testenv.pl
> begin JAVA_HOME =3D
> JAVA_HOME =3D
How about trying the following command:
sudo env JAVA_HOME=3D$JAVA_HOME perl testenv.pl
------------------------------
Date: Wed, 22 Apr 2009 19:00:54 -0700 (PDT)
From: kun niu <haoniukun@gmail.com>
Subject: Re: sudo perl script with environment variables on linux
Message-Id: <acdd3958-35f3-4183-84f8-e492e6d8a636@z8g2000prd.googlegroups.com>
On 4=D4=C223=C8=D5, =C9=CF=CE=E712=CA=B118=B7=D6, powah <wong_po...@yahoo.c=
a> wrote:
> How to use sudo to run a perl script with the environment variable
> JAVA_HOME on linux?
> Running testenv.pl as sudo do not pickup the environment variable
> JAVA_HOME
> value.
>
> $ echo $JAVA_HOME
> /home/powah/jdk1.6.0_13
>
> testenv.pl is:
> #!/usr/bin/perl
> print "begin JAVA_HOME =3D $JAVA_HOME\n";
> $J_HOME =3D $ENV{'JAVA_HOME'};
> print "$ENV{'JAVA_HOME'} JAVA_HOME =3D $J_HOME\n";
>
> $ perl testenv.pl
> begin JAVA_HOME =3D
> /home/powah/jdk1.6.0_13 JAVA_HOME =3D /home/powah/jdk1.6.0_13
>
> $ sudo perl testenv.pl
> begin JAVA_HOME =3D
> JAVA_HOME =3D
Or you can try to edit the /etc/sudoers file and add the following
line:
powah ALL =3D SETENV: ALL
If you have the permission.
------------------------------
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 2361
***************************************