
perlbug-followup at perl
May 22, 2012, 11:12 AM
Post #2 of 3
(44 views)
Permalink
|
|
[perl #96872] CV * typemap entry should support overloading
[In reply to]
|
|
On Tue May 22 09:07:31 2012, smueller [at] cpan wrote: > On 05/22/2012 08:56 AM, Eric Brine wrote: > > On Tue, May 22, 2012 at 2:07 AM, Father Chrysostomos via RT > > <perlbug-followup [at] perl <mailto:perlbug-followup [at] perl>> > wrote: > > > > On Fri Aug 12 10:16:55 2011, smueller [at] cpan > > <mailto:smueller [at] cpan> wrote: > > > If nobody opposes, I'll modify the typemap. No promises that > I won't > > > forget, though. > > > > Did you ever make this change? It seems to ring a bell. > > > > > > It wasn't committed to blead if so. > > Then I most certainly failed to follow through. Apologies to everyone > involved. :( > > Running tests now, but I probably won't be able to commit anything > before tomorrow. > > Would the following naive change work? > > STMT_START { > HV *st; > GV *gvp; > SV * const xsub_tmp_sv = $arg; > SvGETMAGIC(xsub_tmp_sv); > $var = sv_2cv(xsub_tmp_sv, &st, &gvp, 0); > if (!$var) { > Perl_croak(aTHX_ \"%s: %s is not a CODE reference\", > ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, > \"$var\"); > } > } STMT_END I believe so. It would also allow globs, but that’s probably a good thing, for consistency’s sake. In other words, it will be Just Like &{...} -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=96872
|