develooper Front page | perl.perl5.porters | Postings from August 2013

Re: [perl #119455] [EXPERIMENT] pluggable keyword API

Thread Previous | Thread Next
From:
Jesse Luehrs
Date:
August 28, 2013 22:46
Subject:
Re: [perl #119455] [EXPERIMENT] pluggable keyword API
Message ID:
20130828224548.GF15882@tozt.members.linode.com
On Wed, Aug 28, 2013 at 03:28:22PM -0700, Father Chrysostomos via RT wrote:
> On Wed Aug 28 14:17:43 2013, doy@tozt.net wrote:
> > On Wed, Aug 28, 2013 at 02:14:14PM -0700, Father Chrysostomos via RT
> > wrote:
> > > On Wed Aug 28 12:53:28 2013, plokinom@gmail.com wrote:
> > > > 2) Function::Parameters is a lexical pragma. Does D:CP provide
> > lexical
> > > > exports? I don't see how to get the effect of lexically scoped
> > keywords
> > > > with plain subs.
> > >
> > > You can use Lexical::Var for that.  Or use Perl’s own lexical sub
> > > feature.  See
> > <http://perl5.git.perl.org/perl.git/commitdiff/0be5d18d4f53>.
> > 
> > This actually doesn't work yet, because prototypes aren't parsed on
> > lexical subs (and Devel::CallParser hooks into the prototype parsing
> > mechanism). I think this was reported somewhere, but I can't remember
> > where at the moment.
> 
> I think you are confusing call parsers and call checkers; I could be wrong.
> 
> I believe 5.18.1 addressed the latter:
> 
> =item *
> 
> Lexical constants (C<my sub a() { 42 }>) no longer crash when inlined.
> 
> =item *
> 
> Parameter prototypes attached to lexical subroutines are now respected when
> compiling sub calls without parentheses.  Previously, the prototypes were
> honoured only for calls I<with> parentheses. [RT #116735]

Prototypes do work now, but Devel::CallParser still doesn't seem to. I'm
not sure what exactly the issue is.

-doy

Thread Previous | Thread Next


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