develooper Front page | perl.perl5.porters | Postings from February 2011

Re: [PATCH 1/3] get rid of huge swathes of repetitive code inPOSIX.pm

Thread Previous
From:
Aristotle Pagaltzis
Date:
February 2, 2011 00:14
Subject:
Re: [PATCH 1/3] get rid of huge swathes of repetitive code inPOSIX.pm
Message ID:
20110202081443.GE5522@klangraum.plasmasturm.org
* Eirik Berg Hanssen <ebhanssen@cpan.org> [2011-02-01 18:20]:
> On Tue, Feb 1, 2011 at 4:56 PM, Aristotle Pagaltzis <pagaltzis@gmx.de>wrote:
>
> > * John Imrie <j.imrie@virginmedia.com> [2011-01-31 20:35]:
> > > On 31/01/2011 10:20, Aristotle Pagaltzis wrote:
> > > >* Dagfinn Ilmari Mannsåker<ilmari@ilmari.org>  [2011-01-31 10:45]:
> > > >>Aristotle Pagaltzis<pagaltzis@gmx.de>  writes:
> > > >>
> > > >>>+    if (my $how = $replacement{$func}) {
> > > >>>+  croak "Unimplemented: POSIX::$func() is C-specific, stopped" if not defined $how
>
> And how would that come to pass?  Tied variables?  Cosmic
> radiation? :)

Sigh.

> > I do like that it makes naming the value unnecessary, though.
>
>   Ah.
>
> if (exists $replacement{$func}) {
>   my $_ = $replacement{$func};

Yeah… that is precisely what was there originally, before
I hastily rewrote it not to depend on 5.10 features.

I guess I really should just take the given/when route.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About