Skip Menu |
 

This queue is for tickets about the signatures CPAN distribution.

Report information
The Basics
Id: 80453
Status: new
Priority: 0/
Queue: signatures

People
Owner: Nobody in particular
Requestors: MAUKE [...] cpan.org
Cc:
AdminCc:

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



Subject: generated code "leaks" into return value of empty-body subs
Download (untitled) / with headers
text/plain 455b
#!perl use signatures; sub empty ($x) { } print empty("A", "B"), "\n"; # list context print scalar empty("A", "B"), "\n"; # scalar context __END__ $ perl leak.pl A 2 I think 'empty' should return the empty list in list context and undef in scalar context, just as if it was 'sub empty {}'. I know where the values are coming from, but I think this is an implementation detail (that should not be exposed to the user) leaking through the abstraction.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.