[23793] in Perl-Users-Digest
Perl-Users Digest, Issue: 5996 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 29 18:22:54 2004
Date: Thu, 29 Jan 2004 15:22:23 -0800 (PST)
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, 29 Jan 2004 Volume: 10 Number: 5996
Today's topics:
Re: An instinctive perlgolf attempt ("fizz buzz"!) (Jay Tilton)
Re: An instinctive perlgolf attempt ("fizz buzz"!) <bik.mido@tiscalinet.it>
Re: An instinctive perlgolf attempt ("fizz buzz"!) <pinyaj@rpi.edu>
Re: An instinctive perlgolf attempt ("fizz buzz"!) <uri@stemsystems.com>
Re: An instinctive perlgolf attempt ("fizz buzz"!) <bik.mido@tiscalinet.it>
Re: An instinctive perlgolf attempt ("fizz buzz"!) (G Klinedinst)
Re: An instinctive perlgolf attempt ("fizz buzz"!) <bik.mido@tiscalinet.it>
Re: An instinctive perlgolf attempt ("fizz buzz"!) (G Klinedinst)
Re: An instinctive perlgolf attempt ("fizz buzz"!) <matthew.garrish@sympatico.ca>
Re: An instinctive perlgolf attempt ("fizz buzz"!) <bik.mido@tiscalinet.it>
Re: an interesting CGI problem <matthew.garrish@sympatico.ca>
ANN: CamelBones 0.2.1 <spamtrap@dot-app.org>
ANNOUNCE: CGI-Application-Plus-1.1 distribution <dd@4pro.net>
ANNOUNCE: CGI::TabPane V 1.00 <ron@savage.net.au>
ANNOUNCE: CGI::TabPane V 1.02 <ron@savage.net.au>
ANNOUNCE: Date::MSAccess V 1.00 <ron@savage.net.au>
ANNOUNCE: DBIx::Admin::BackupRestore V 1.00 <ron@savage.net.au>
ANNOUNCE: DBIx::Admin::TableInfo V 1.00 <ron@savage.net.au>
ANNOUNCE: DBIx::MSAccess::Convert2Db V 1.00 <ron@savage.net.au>
ANNOUNCE: DBIx::MSAccess::Convert2Db V 1.01 <ron@savage.net.au>
ANNOUNCE: OOTools-1.6 distribution <dd@4pro.net>
ANNOUNCE: Template::Magic-1.02 distribution <dd@4pro.net>
ANNOUNCE: Tk::LineNumberText (Jack D)
Arabic to Arabic font conversion (on Windows) <news@LearnQuick.com>
Re: Arabic to Arabic font conversion (on Windows) (Anno Siegel)
Re: Arabic to Arabic font conversion (on Windows) <news@LearnQuick.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 22 Jan 2004 05:17:49 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <400f5c93.169469676@news.erols.com>
Michele Dondi <bik.mido@tiscalinet.it> wrote:
: David Flanagan in his book "Java examples in a nutshell" mentions a
: game called "fizz buzz"[1] in which two players must enumerate numbers
: from 1 to 100 in turns saying 'fizz' if the number is divisible by 5,
: 'buzz' if it is divisible by 7 and 'fizzbuzz' if it is divisible by
: both.
I remember a version of that game that involved beer.
: So, why not thinking about the shortest way to do it, too?!? Well, my
: first idea was something along the lines of
:
: #!/usr/bin/perl -l
: print[$_,fizz,buzz,fizzbuzz]->[!($_%7)*2+!($_%5)]for 1..100
:
: that indeed is interesting on its own IMHO, but I was really bothered
: by that 'fizzbuzz' thing and OTOH any trick to avoid inserting it as a
: literal seemed more expensive.
: Eventually this is the best I can do:
:
: #!/usr/bin/perl
: print+($_%5?'':fizz).($_%7?'':buzz)||$_,$/for 1..100
:
: Anything "better"?
print+fizz x/0|5$/.buzz x!($_%7)||$_,$/for 1..100
------------------------------
Date: Sat, 24 Jan 2004 00:32:36 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <4kb310pl8ql9aapjufc5fh6tmfl15p4tsu@4ax.com>
On Thu, 22 Jan 2004 05:17:49 GMT, tiltonj@erols.com (Jay Tilton)
wrote:
>: print+($_%5?'':fizz).($_%7?'':buzz)||$_,$/for 1..100
>:
>: Anything "better"?
>
> print+fizz x/0|5$/.buzz x!($_%7)||$_,$/for 1..100
D'Oh!
Well... not that much "D'Oh" after all: I *did* expect someone to come
up with something "better", just being curious about that
"something"...
Michele
--
# This prints: Just another Perl hacker,
seek DATA,15,0 and print q... <DATA>;
__END__
------------------------------
Date: Thu, 22 Jan 2004 22:14:48 -0500
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <Pine.SGI.3.96.1040122221402.65762A-100000@vcmr-64.server.rpi.edu>
On Sat, 24 Jan 2004, Michele Dondi wrote:
>On Thu, 22 Jan 2004 05:17:49 GMT, tiltonj@erols.com (Jay Tilton)
>wrote:
>
>>: print+($_%5?'':fizz).($_%7?'':buzz)||$_,$/for 1..100
>>:
>>: Anything "better"?
>>
>> print+fizz x/0|5$/.buzz x!($_%7)||$_,$/for 1..100
False positive on 101, 102, 103, etc. (anything with a '0' in it is
fizz'd). /0|5$/ needs to be /[05]$/, which is only +1 char.
--
Jeff Pinyan RPI Acacia Brother #734 2003 Rush Chairman
"And I vos head of Gestapo for ten | Michael Palin (as Heinrich Bimmler)
years. Ah! Five years! Nein! No! | in: The North Minehead Bye-Election
Oh. Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)
------------------------------
Date: Fri, 23 Jan 2004 04:17:14 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <x7fze75meu.fsf@mail.sysarch.com>
>>>>> "J'P" == Jeff 'japhy' Pinyan <pinyaj@rpi.edu> writes:
J'P> On Sat, 24 Jan 2004, Michele Dondi wrote:
>>>
>>> print+fizz x/0|5$/.buzz x!($_%7)||$_,$/for 1..100
J'P> False positive on 101, 102, 103, etc. (anything with a '0' in it is
J'P> fizz'd). /0|5$/ needs to be /[05]$/, which is only +1 char.
then convert to the % form as with 7 for a tie:
print+fizz x/0|5$/.buzz x!($_%7)||$_,$/for 1..100
print+fizz x/p05]$/.buzz x!($_%7)||$_,$/for 1..100
print+fizz x!($_%5).buzz x!($_%7)||$_,$/for 1..100
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: Sat, 24 Jan 2004 16:07:53 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <j51510lg9hjdk7qq0c41qdm72fbim6j4rg@4ax.com>
On Fri, 23 Jan 2004 04:17:14 GMT, Uri Guttman <uri@stemsystems.com>
wrote:
>>>>>> "J'P" == Jeff 'japhy' Pinyan <pinyaj@rpi.edu> writes:
>
> >>> print+fizz x/0|5$/.buzz x!($_%7)||$_,$/for 1..100
>
> J'P> False positive on 101, 102, 103, etc. (anything with a '0' in it is
> J'P> fizz'd). /0|5$/ needs to be /[05]$/, which is only +1 char.
Since the "requirements" (admittedly loosely stated) were to play the
game for 1..100, the code above definitely yields the expected output.
Just don't know wether the author was aware of this (strongly suspect
so!) or if it was a lucky case, but who cares anyway?
>then convert to the % form as with 7 for a tie:
>
>print+fizz x/0|5$/.buzz x!($_%7)||$_,$/for 1..100
>print+fizz x/p05]$/.buzz x!($_%7)||$_,$/for 1..100
>print+fizz x!($_%5).buzz x!($_%7)||$_,$/for 1..100
also,
print+fizz x/0$|5$/.buzz x!($_%7)||$_,$/for 1..100
But then the one with ($_%5) indeed is better. However the good point
IMHO is in using the x operator that is something I hadn't thought of,
struggling with or's that couldn't work because
0 . 0 ? 'true' : 'false'
is 'true'...
Which is also the good point of perl golfing, i.e. not just competing,
not just squeezing the very last charachter off one's code. But using
smartly operators in techniques that may be OK also for non-so-extreme
situations.
BTW:
On Wed, 21 Jan 2004 21:35:02 +0100, I wrote:
>(-l is more expensive as of the rules I know for perlgolf, see e.g.
><http://perlgolf.terje.org>).
I got that wrong: it is <http://terje.perlgolf.org>
Michele
--
# This prints: Just another Perl hacker,
seek DATA,15,0 and print q... <DATA>;
__END__
------------------------------
Date: 23 Jan 2004 15:42:47 -0800
From: g_klinedinst@hotmail.com (G Klinedinst)
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <168f035a.0401231542.1c7a0af0@posting.google.com>
Michele Dondi <bik.mido@tiscalinet.it> wrote in message news:
> Then he gives a Java program running a version of the game in which of
> course there aren't two players but numbers or 'fizz's and 'buzz's are
> simply printed to STDOUT. So it was natural (well, for me!) to think
> about the same thing[2] in Perl...
> Anything "better"?
I definately am not anywhere near everyone else's level, but thanks
for the fun game late on a Friday. I tried with recursion just for
fun.
#!/usr/local/bin/perl
z(1);
sub z
{
my $a=shift; my $r;
if($a>100){return();}
else{if($a%5==0){$r="fizz"}
if($a%7==0){$r.="buzz"}print $r||$a;z($a+1);}
}
I had use strict, and -w in there but removed it for space reasons.
-Greg
------------------------------
Date: Mon, 26 Jan 2004 12:18:13 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <0is910531v0dsivt76ucjclo8s7cdpj51j@4ax.com>
On 23 Jan 2004 15:42:47 -0800, g_klinedinst@hotmail.com (G Klinedinst)
wrote:
>#!/usr/local/bin/perl
>z(1);
>sub z
>{
>my $a=shift; my $r;
>if($a>100){return();}
>else{if($a%5==0){$r="fizz"}
>if($a%7==0){$r.="buzz"}print $r||$a;z($a+1);}
>}
>
>
>I had use strict, and -w in there but removed it for space reasons.
So you have a strict- and warnings- safe perl golf script. But since
you removed 'use strict' and -w (but you surely know that with recent
enough perls it is better to 'use warnings', don't you?), what is the
point having it safe in that sense?
More clearly your attempt is strange in that it shows some golfing
beahaviour along with unnecessary "features", like (just to take an
example)
if($a>100){return();}
whereas it may have been
return if $a>100;
also in a non-perl-golfing context: IMHO the second form is much
clearer since it hasn't any unnecessary annoying punctuation. After
all this is Perl, not C!
However if you really want to try a *recursive* golfing solution, why
don't you adapt Jay Tilton's one?
#!/usr/local/bin/perl
sub z{($_=pop)>100?exit:print+fizz x/0|5$/.buzz
x!($_%7)||$_,$/;z($_+1)}z(1)
Michele
--
# This prints: Just another Perl hacker,
seek DATA,15,0 and print q... <DATA>;
__END__
------------------------------
Date: 26 Jan 2004 07:38:59 -0800
From: g_klinedinst@hotmail.com (G Klinedinst)
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <168f035a.0401260738.1b0d890a@posting.google.com>
Michele Dondi <bik.mido@tiscalinet.it> wrote:
>(but you surely know that with recent
> enough perls it is better to 'use warnings', don't you?)
Nope, I didn't know that. The book I have says use the "-w" switch.
> More clearly your attempt is strange in that it shows some golfing
> beahaviour along with unnecessary "features", like (just to take an
> example)
>
> if($a>100){return();}
>
> whereas it may have been
>
> return if $a>100;
>
> also in a non-perl-golfing context: IMHO the second form is much
> clearer since it hasn't any unnecessary annoying punctuation. After
> all this is Perl, not C!
I agree that the second form is shorter, and since the whole idea was
to do it as short as possible it is better, but if I were to write
this program to actually use I would use the first form b/c it is more
readable to me. BTW, what is golfing( other than a fun sport )?
> However if you really want to try a *recursive* golfing solution, why
> don't you adapt Jay Tilton's one?
>
> #!/usr/local/bin/perl
> sub z{($_=pop)>100?exit:print+fizz x/0|5$/.buzz
> x!($_%7)||$_,$/;z($_+1)}z(1)
Because I was trying not to use other people's examples, while I was
writing mine. Plus I don't understand what is going on in it.
Thanks for looking at my program, I will take another shot at it over
lunch if I have time.
-Greg
BTW, the fizz buzz problem I came across on line while looking for
detailed instructions said that one should "fizz" on anything
divisible by 5, or with 5 in the number, and likewise "buzz" on
anything divisible by 7 or with 7 in the number. "Fizzbuzz" would be
the same thing, divisible by 5 & 7 or containing the 5 & 7 anywhere in
the number. Just thought you might be interested in trying that form
too.
------------------------------
Date: Mon, 26 Jan 2004 18:14:57 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <LbhRb.4132$qU3.182898@news20.bellglobal.com>
"G Klinedinst" <g_klinedinst@hotmail.com> wrote in message
news:168f035a.0401260738.1b0d890a@posting.google.com...
>
> I agree that the second form is shorter, and since the whole idea was
> to do it as short as possible it is better, but if I were to write
> this program to actually use I would use the first form b/c it is more
> readable to me. BTW, what is golfing( other than a fun sport )?
>
Not the most intuitive name for it, but it does make sense after you read
this quote:
This type of coding competition was named Perl Golf by Greg Bacon because in
both Perl and physical golf the goal is to finish with the fewest
(key)strokes.
Matt
------------------------------
Date: Thu, 29 Jan 2004 00:02:38 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: An instinctive perlgolf attempt ("fizz buzz"!)
Message-Id: <7a8g10doo80fbpoa2d63cgh0ncea11gfse@4ax.com>
On 26 Jan 2004 07:38:59 -0800, g_klinedinst@hotmail.com (G Klinedinst)
wrote:
>> beahaviour along with unnecessary "features", like (just to take an
>> example)
>>
>> if($a>100){return();}
>>
>> whereas it may have been
>>
>> return if $a>100;
>>
>> also in a non-perl-golfing context: IMHO the second form is much
>> clearer since it hasn't any unnecessary annoying punctuation. After
>> all this is Perl, not C!
[slighty edited for clarity]
>I agree that the second form is shorter, and since the whole idea was
>to do it as short as possible it is better, but if I were to write
>this program to actually use I would use the first form b/c it is more
>readable to me.
Well, readability is subjective of course. I'll repeat myself here:
IMHO the second form is more readable. It is also a typical example of
the natural language principles that are so pervasive in Perl.
You may enjoy reading 'perldoc perlstyle', but of course you're
encouraged to follow your own style. However to stress the point of
view that I'm trying to illustrate, I'll point out that
return if $a>100;
is not by any means the shortest WTDI:
$a>100&&return;
and since in that context return()ing meant to terminate the script,
also
$a>100&&exit;
OTOH I *cannot* understand how "();" can improve readability when you
have *all* these equivalent possibilities (amongst the others):
if($a>100){return();};
if($a>100){return()};
if($a>100){return;};
if($a>100){return();}
if($a>100){return()}
if($a>100){return;}
if($a>100){return}
if($a>100){return};
return if $a>100;
return() if $a>100;
$a>100 and return();
$a>100 && return();
$a>100 and return;
$a>100 && return;
...
BTW: now that I come to think of it, do you know that $a and $b are
not *exactly* generic variables? Consider the following example:
# perl -wMstrict -e '$a=1'
Name "main::a" used only once: possible typo at -e line 1.
# perl -wMstrict -e '$c=1'
Global symbol "$c" requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.
Surprised? See 'perldoc perlvar' and 'perldoc -f sort' then...
>> However if you really want to try a *recursive* golfing solution, why
>> don't you adapt Jay Tilton's one?
>>
>> #!/usr/local/bin/perl
>> sub z{($_=pop)>100?exit:print+fizz x/0|5$/.buzz
>> x!($_%7)||$_,$/;z($_+1)}z(1)
>
>Because I was trying not to use other people's examples, while I was
>writing mine. Plus I don't understand what is going on in it.
A quote:
He "steals".
You "reuse".
I "enhance the value of".
- "Alex" on comp.lang.perl.misc (slightly edited)
(this is a .sig of mine)
As far as "what is going on in it" is concerned, generally I'd
recommend to ask perl to help you with B::Deparse, as in:
# perl -MO=Deparse fizzbuzz.pl
;
foreach $_ (1 .. 100) {
print 'fizz' x /0|5$/ . 'buzz' x !($_ % 7) || $_, $/;
}
fizzbuzz.pl syntax OK
# perl -MO=Deparse,-p fizzbuzz.pl
;
foreach $_ (1 .. 100) {
print(((('fizz' x /0|5$/) . ('buzz' x (!($_ % 7)))) || $_), $/);
}
fizzbuzz.pl syntax OK
but in this case it doesn't make much difference, and in fact the
original code is already quite transparent. All you have to do is to
check the documentation for the operators it uses.
>BTW, what is golfing( other than a fun sport )?
Another poster kindly gave you an explanation. You may also consider
giving a peek e.g. into the website I mentioned in the other post.
I'll add just a brief consideration: I am not a golfer and I'm not
really interested in perl golf per se. In it it's officially OK to use
any sort of dirty trick and bad programming technique, but along with
micro optimizations one is forced to search the conceptually simplest
algorithms, and to investigate them. It is an exercise, and just like
obfuscation and writing japhs, can give a helping hand at deepening
one's knowledge of Perl...
>BTW, the fizz buzz problem I came across on line while looking for
>detailed instructions said that one should "fizz" on anything
>divisible by 5, or with 5 in the number, and likewise "buzz" on
>anything divisible by 7 or with 7 in the number. "Fizzbuzz" would be
>the same thing, divisible by 5 & 7 or containing the 5 & 7 anywhere in
>the number. Just thought you might be interested in trying that form
>too.
Funny! If I am not mistaken, a number 1..100 is "divisible by 5, or
with 5 in it" iff it has either 0 or 5 amongst its digits, so half of
the problem is actually easier than in the previous case. For the
other half, I can't think of any way to avoid a double pair of parens:
print+fizz x/0|5/.buzz x(/7/|!($_%7))||$_,$/for 1..100
but I've not thought much about it and I'm only a second-rate golfer
anyway!
Michele
--
#!/usr/bin/perl -lp
BEGIN{*ARGV=do{open $_,q,<,,\$/;$_}}s z^z seek DATA,11,$[;($,
=ucfirst<DATA>)=~s x .*x q^~ZEX69l^^q,^2$;][@,xe.$, zex,s e1e
q 1~BEER XX1^q~4761rA67thb ~eex ,s aba m,P..,,substr$&,$.,age
__END__
------------------------------
Date: Mon, 26 Jan 2004 08:10:30 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: an interesting CGI problem
Message-Id: <6l8Rb.1543$mf4.354112@news20.bellglobal.com>
"kz" <notpublic@restricted.com> wrote in message
news:K28Rb.11$O71.11442@news.uswest.net...
>
> If I point my browser to http://myserver.com/cgi-bin/env.cgi it offers me
to
> download env.cgi with an unknown file type.
>
> If I rename this cgi script to e.g. blabla.cgi and point my browser to it,
I
> receive the results I've expected.
>
> Running NT 4, Perl 5.6.1 build 631 of ActiveState and Xitami web server
from
> www.imatix.com.
>
> Can this be a webserver-specific issue? Has anyone seen this elsewhere:
> other platforms, other webservers?
>
It certainly isn't a Perl issue. A complete and total guess would be that
there is a built-in script in the web server that you can call to find out
your environment, and it's overriding your script. But if you want to know
for sure you should probably ask the kind people at imatix.com.
Matt
------------------------------
Date: Thu, 29 Jan 2004 08:50:46 GMT
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: ANN: CamelBones 0.2.1
Message-Id: <Hs9JtK.254J@zorch.sf-bay.org>
There's a new Camel in town. ;-)
What is CamelBones?
In a nutshell, CamelBones is a Cocoa/Perl bridge. It allows you to write Mac
OS X GUI applications that use Apple's Cocoa library in Perl.
What's New in 0.2.1?
Panther compatibility, a tiny (140K) new "runtime" download for end users
who just want the framework without all the development stuff, several new
example projects, automatic creation of Perl wrappers for all linked
Objective-C classes, the capability to include version- and
architecture-specific module directories in your applications, and more.
Web Sites:
<http://camelbones.sourceforge.net>
<http://www.sourceforge.net/projects/camelbones/>
Have the appropriate amount of fun!
sherm--
------------------------------
Date: Tue, 20 Jan 2004 10:21:17 GMT
From: "Domizio Demichelis" <dd@4pro.net>
Subject: ANNOUNCE: CGI-Application-Plus-1.1 distribution
Message-Id: <HruHBH.qBJ@zorch.sf-bay.org>
The new (1.1) version of these modules has been released:
- CGI::Application::Plus
CGI::Application rewriting with several pluses
- Apache::Application::Plus
Apache/mod_perl integration for CGI::Application::Plus
- CGI::Application::Magic
Template based framework for CGI applications
- Apache::Application::Magic
Apache/mod_perl integration for CGI::Application::Magic
- CGI::Application::CheckRM
Checks run modes using Data::FormValidator
--------------
Details:
http://search.cpan.org/~domizio/CGI-Application-Plus-1.1/
Installation
install Bundle::Application::Magic
--
perl -MLWP::Simple -e "getprint(' http://perl.4pro.net ')"
------------------------------
Date: Sun, 25 Jan 2004 05:22:58 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: CGI::TabPane V 1.00
Message-Id: <Hs7IC0.21Fr@zorch.sf-bay.org>
The pure Perl module CGI::TabPane V 1.00
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.
On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.
An extract from the docs:
NAME
CGI::TabPane - Support panes with clickable tabs
CGI::TabPane is a wrapper around the superb JavaScript package 'Tab Pane' by Erik Arvidsson.
Erik's article on Tab Pane is here: http://webfx.eae.net/dhtml/tabpane/tabpane.html
--
Cheers
Ron Savage, ron@savage.net.au on 25/01/2004
http://savage.net.au/index.html
------------------------------
Date: Thu, 29 Jan 2004 03:31:14 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: CGI::TabPane V 1.02
Message-Id: <Hs9Ju2.45@zorch.sf-bay.org>
The pure Perl module CGI::TabPane V 1.02
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.
On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.
An extract from the docs:
NAME
CGI::TabPane - Support panes with clickable tabs
Recent changes:
1.02 Thu Jan 29 12:37:29 2004
- Add parameter to new() called current_tab, to allow the user to specify which tab is to be the current tab
when the first pane is displayed. See POD for details
- Add parameter to new() called use_cookie, to allow the user to specify whether or not a cookie is used by the
JavaScript to save the state of which tab is the current tab on the first pane. This option was suggested by
Enrico Sorcinelli. See POD for details
- Document limitations: 66 tabs per pane and 99 non-nested panes
- Change call to new() in examples/test-cgi-tabpane.cgi to include these values:
current_tab => 'Privacy',
use_cookie => 0
- Fix typo in examples/test-cgi-tabpane.cgi. The parameter to new() was:
style => '/css/tabpane/webfx.css',
and is now:
style_css => '/css/tabpane/webfx.css',
- Fix Makefile.PL to exclude DBI, because Makefile.PL was copied carelessly from another project, and to include
Test::More, because the latter module is used in t/test.t
--
Cheers
Ron Savage, ron@savage.net.au on 29/01/2004
http://savage.net.au/index.html
------------------------------
Date: Tue, 20 Jan 2004 23:41:41 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: Date::MSAccess V 1.00
Message-Id: <HruHC8.1xDn@zorch.sf-bay.org>
The pure Perl module Date::MSAccess V 1.00
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.
On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.
An extract from the docs:
NAME
Date::MSAccess - Manage dates in MS Access format
--
Cheers
Ron Savage, ron@savage.net.au on 21/01/2004
http://savage.net.au/index.html
------------------------------
Date: Thu, 22 Jan 2004 05:52:53 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: DBIx::Admin::BackupRestore V 1.00
Message-Id: <HrwMLK.88L@zorch.sf-bay.org>
The pure Perl module DBIx::Admin::BackupRestore V 1.00
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.
On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.
An extract from the docs:
NAME
DBIx::Admin::BackupRestore - Back-up all tables in a db to XML, and restore them
--
Cheers
Ron Savage, ron@savage.net.au on 22/01/2004
http://savage.net.au/index.html
------------------------------
Date: Wed, 21 Jan 2004 10:12:43 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: DBIx::Admin::TableInfo V 1.00
Message-Id: <HruHEH.qFo@zorch.sf-bay.org>
The pure Perl module DBIx::Admin::TableInfo V 1.00
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.
On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.
An extract from the docs:
NAME
DBIx::Admin::TableInfo - A wrapper around DBI's table_info() and column_info()
--
Cheers
Ron Savage, ron@savage.net.au on 21/01/2004
http://savage.net.au/index.html
------------------------------
Date: Tue, 20 Jan 2004 23:40:19 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: DBIx::MSAccess::Convert2Db V 1.00
Message-Id: <HruHC1.qC9@zorch.sf-bay.org>
The pure Perl module DBIx::MSAccess::Convert2Db V 1.00
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.
On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.
An extract from the docs:
NAME
DBIx::MSAccess::Convert2Db - Convert an MS Access database into a MySQL/Postgres/Other database
--
Cheers
Ron Savage, ron@savage.net.au on 21/01/2004
http://savage.net.au/index.html
------------------------------
Date: Wed, 21 Jan 2004 06:00:56 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: DBIx::MSAccess::Convert2Db V 1.01
Message-Id: <HruHEo.qGD@zorch.sf-bay.org>
The pure Perl module DBIx::MSAccess::Convert2Db V 1.01
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.
On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.
An extract from the docs:
NAME
Date::MSAccess - Manage dates in MS Access format
CHANGES
1.01 Wed Jan 21 13:48:00 2004
- Change handing of verbose option to only save log if verbose is true
--
Cheers
Ron Savage, ron@savage.net.au on 21/01/2004
http://savage.net.au/index.html
------------------------------
Date: Tue, 20 Jan 2004 09:53:33 GMT
From: "Domizio Demichelis" <dd@4pro.net>
Subject: ANNOUNCE: OOTools-1.6 distribution
Message-Id: <HruHAy.1xCw@zorch.sf-bay.org>
The new (1.6) version of these modules has been released:
- Class::constr
Pragma to implement constructor methods
- Class::props
Pragma to implement lvalue accessors with options
- Class::groups
Pragma to implement groups of properties accessors with options
- Object::props
Pragma to implement lvalue accessors with options
- Object::groups
Pragma to implement groups of properties accessors with options
--------------
Details:
http://search.cpan.org/~domizio/OOTools-1.6/
Installation:
install OOTools
--
perl -MLWP::Simple -e "getprint(' http://perl.4pro.net ')"
------------------------------
Date: Tue, 20 Jan 2004 10:21:22 GMT
From: "Domizio Demichelis" <dd@4pro.net>
Subject: ANNOUNCE: Template::Magic-1.02 distribution
Message-Id: <HruHBr.6A7@zorch.sf-bay.org>
The new (1.02) version of these modules has been released:
- Template::Magic
Magic merger of runtime values with templates
- Template::Magic::HTML
HTML handlers for Template::Magic used in a HTML environment
--------------
Details:
http://search.cpan.org/~domizio/Template-Magic-1.02/
Installation
install Bundle::Template::Magic
--
perl -MLWP::Simple -e "getprint(' http://perl.4pro.net ')"
------------------------------
Date: Mon, 26 Jan 2004 01:46:55 GMT
From: goodcall1@hotmail.com (Jack D)
Subject: ANNOUNCE: Tk::LineNumberText
Message-Id: <Hs7IC8.21GJ@zorch.sf-bay.org>
Add line numbers to your favorite Tk::Text derived widget. Available
immediately on CPAN:
http://www.cpan.org/authors/id/D/DU/DUNNIGANJ/
Jack
------------------------------
Date: Mon, 26 Jan 2004 18:22:16 GMT
From: "Herb Martin" <news@LearnQuick.com>
Subject: Arabic to Arabic font conversion (on Windows)
Message-Id: <sVcRb.18598$6o4.13319@fe2.texas.rr.com>
[I can program in Perl but prefer some guidance from someone who has been
down this road before, or possibly a pointer to a code module that solves
some
or all of the problem...]
Environment: Windows XP (English) with full Arabic font support (both
regional and user interface loaded)
I have a PDF document (although this is an issue with other sources as well)
which contains Arabic script.
I am seeking a method to convert the fonts into readable Arabic fonts.
When I select and paste from such documents, into an (html) email, or Word,
or a text file, I end up with the "word salad" effect, accented and special
characters similar to Latin characters but probably intended for European
languages
other than English-US.
Assumption: The character set encoding is in the PDF but is not copied as
part of the "clipboard" selection property therefore when it is pasted it is
merely the
raw (8 bit probably) code that is inserted and thus displays incorrectly.
--
Herb Martin
--
Herb Martin
------------------------------
Date: 26 Jan 2004 19:41:23 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Arabic to Arabic font conversion (on Windows)
Message-Id: <bv3qh3$e8j$2@mamenchi.zrz.TU-Berlin.DE>
Herb Martin <news@LearnQuick.com> wrote in comp.lang.perl.misc:
> [I can program in Perl but prefer some guidance from someone who has been
> down this road before, or possibly a pointer to a code module that solves
> some
> or all of the problem...]
>
> Environment: Windows XP (English) with full Arabic font support (both
> regional and user interface loaded)
>
> I have a PDF document (although this is an issue with other sources as well)
> which contains Arabic script.
>
> I am seeking a method to convert the fonts into readable Arabic fonts.
>
> When I select and paste from such documents, into an (html) email, or Word,
> or a text file, I end up with the "word salad" effect, accented and special
> characters similar to Latin characters but probably intended for European
> languages
> other than English-US.
>
> Assumption: The character set encoding is in the PDF but is not copied as
> part of the "clipboard" selection property therefore when it is pasted it is
> merely the
> raw (8 bit probably) code that is inserted and thus displays incorrectly.
I'm not sure if this is even a good approach, but supposed it is, you're
miles away from a Perl question yet.
You'd need to find out what encoding(s) are used in the original, what
encodings are needed in the various kinds of document you mention, and
if the word salad you receive contains enough information to recover
the original content. Then you can consider a Perl program to do the
conversion.
Anno
------------------------------
Date: Tue, 27 Jan 2004 14:39:48 GMT
From: "Herb Martin" <news@LearnQuick.com>
Subject: Re: Arabic to Arabic font conversion (on Windows)
Message-Id: <UKuRb.19735$6o4.11468@fe2.texas.rr.com>
> I'm not sure if this is even a good approach, but supposed it is, you're
> miles away from a Perl question yet.
Well, I was hoping it was a Perl program due to some known library
or module being available, or due to some other Perl programmer
having solved it.
As an inherently "character processing" problem it will likely fall to a
Perl solution readily once I understand the encodings (or find a module
that already has this knowledge within it.)
--
Herb Martin
------------------------------
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 V10 Issue 5996
***************************************