[27200] in Perl-Users-Digest
Perl-Users Digest, Issue: 9010 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 2 09:05:39 2006
Date: Thu, 2 Mar 2006 06:05:04 -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, 2 Mar 2006 Volume: 10 Number: 9010
Today's topics:
Re: A Problem With GD <markem@airmail.net>
Re: DynaLoader <nospam-abuse@ilyaz.org>
Re: Ordered hashes (Anno Siegel)
Re: Remote.pm (File::Remote) problem <"harryfmudd [AT] comcast [DOT] net">
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 02 Mar 2006 07:58:52 -0600
From: Mark Manning <markem@airmail.net>
Subject: Re: A Problem With GD
Message-Id: <120duenm99uodf9@corp.supernews.com>
HA! That was very good! :-)
Samwyse wrote:
> Mark Manning wrote:
>
>> I was looking for someone.
>
>
> Then you need to try alt.personals
------------------------------
Date: Thu, 2 Mar 2006 09:39:06 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: DynaLoader
Message-Id: <du6efq$2dov$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Ferry Bolhar
<bol@adv.magwien.gv.at>], who wrote in article <1141226018.699654@proxy.dienste.wien.at>:
> boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) &&
> What I can't unterstand is the purpose of the 'DynaLoader' argument
> in the call to "boot_DynaLoader". It works without this argument as
> well and in the generated boot_DynaLoader() function (by xsubpp, I
> suppose), there is no use of this argument in any way.
This is just the calling convention for the boot_* function. Somebody
might have thought that the same boot_Foo() could be used with many
different modules (e.g., by *boot_Bar = \&boot_Foo; although this
exact syntax probably was not available when the API was created. ;-)
Hope this helps,
Ilya
------------------------------
Date: 2 Mar 2006 08:11:56 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Ordered hashes
Message-Id: <du69cc$d0n$1@mamenchi.zrz.TU-Berlin.DE>
January Weiner <january.weiner@gmail.com> wrote in comp.lang.perl.misc:
> Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> > There are modules that give you hashes that *do* preserve order.
> > Tie::IxHash is one.
>
> Right, thanks -- that is the solution I sought.
>
> > Why not? A typical menu doesn't have a million entries. It is usually
> > no problem to sort the entries alphabetically by their hash keys each
> > time they are displayed.
>
> Either you have Menus not sorted logically, or you have to remember that
> "File" is "aFile" and "Help" is "zHelp". Anyway, menus were just an
> example I came up with.
Ah, okay. You could sort them alphabetically, but that isn't the
order you want.
> > Pretend? You have changed the representation, the menu now *is* an
> > array.
>
> Yes, formally speaking it is, but practically speaking I do not use it as
> one, correct? Anyway, it was a metaphor.
>
> > I'd probably use another variant. Represent the menu as a list of
> > pairs:
>
> > my @menu = (
> > [ -file => [ qw( new open save)]],
> > [ -analyze => [ qw( count add subtract)]],
> > [ -help => [ qw( yelp cry), 'bang your head on the wall']],
> > );
>
> > Then you can loop over @menu in the given order (like an array) and
> > access the name and the choices individually, like with a hash.
>
> I think I'm lost. How can I access the elements of @menu above
> individually like in a hash?
You can't, but for what my example code does you don't need to.
> I have to access the elements of @menu by
> their index, and cannot do so by the key (or you mean the elements of the
> anonymous arrays within?).
Basically you need a hash *and* an array for that. You can do that
yourself, or use one of the ordered-hash modules that hide the
implementation.
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
------------------------------
Date: Thu, 02 Mar 2006 08:04:26 -0500
From: "harryfmudd [AT] comcast [DOT] net" <"harryfmudd [AT] comcast [DOT] net">
Subject: Re: Remote.pm (File::Remote) problem
Message-Id: <HP6dnQDxcZDBcJvZRVn-uA@comcast.com>
A. Sinan Unur wrote:
>
> Well, apologoies, I misdiagnosed the problem. I looked at the source
> code of File::Remote, and the problem simply is that /dev/null has a
> different name on Windows, i.e. NUL.
Yeah, Perl is eminently portable - until someone sticks in an
OS-specific construct. Maybe this is the Unix programmers' revenge for
all those stupid question marks in web pages made by windows users.
>
> The dirty fix would involve replacing File::Remote::_system.
>
> You could also just go in and edit out the 1 > /dev/null out of the
> backticked string. But then, you'd be modifiying a module, and it might
> get overwritten when you upgrade to a new version etc.
Another alternative is to contact the creater of the module. If he's
willing to have his module dependent on File::Spec, he can get the
correct device name from File::Spec->devnull(), and not have to worry
about what to call the null device. The File::Spec solution also covers
VMS, which calls it NLA0:.
Tom Wyant
------------------------------
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 9010
***************************************