Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 114605
Status: resolved
Priority: 0/
Queue: Moo

People
Owner: Nobody in particular
Requestors: ribasushi [...] leporine.io
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Sub::Quote no_install + no_defer do not work as expected
Given: perl -MB::Deparse -MSub::Quote -e ' warn Sub::Quote->VERSION . "\n\n"; for (0, 0, 1) { my $name = "Foo::bar$_"; my $cref = quote_sub( $name, "42", {}, { no_install => 1, no_defer => $_ } ); warn "Created cref $cref:\n " . B::Deparse->new->coderef2text($cref) . "\n"; eval "warn $name()" or warn "$name not found: $@\n"; } ' Latest indexed (2.001001) returns a deferred coderef during the last interation: ... Created cref CODE(0x29f5490): { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[3]); goto \&$undeferred; } Foo::bar1 not found: Undefined subroutine &Foo::bar1 called at (eval 24) line 1. Current master (1e2958cce1) correctly returns an un-deferred coderef, but disrespects 'no_install': ... Created cref CODE(0x20cda60): { package Foo; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x55\x51\x55\x00"} '???'; package main; 42; } 42 at (eval 25) line 1.
On Mon May 23 16:45:50 2016, RIBASUSHI wrote: Show quoted text
> Latest indexed (2.001001) returns a deferred coderef
Disregard that part, I misapplied `git describe` when checking if no_defer ever made it to cpan. /me--
Fixed in git.
Fixed in git.
Stable fix in 2.002002.