Skip Menu |

This queue is for tickets about the Module-Runtime CPAN distribution.

Report information
The Basics
Id: 104244
Status: new
Priority: 0/
Queue: Module-Runtime

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

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



Subject: use_module_optimisitcally fatalizes under Devel::Hide

Attached is code that replicates a fatal error with use_module_optimistically which occurs when Devel::Hide is employed to intentionally hide the module.

 

perl /tmp/devel_hide.pl
Devel::Hide hides I/Do/Not/Exist.pm
not ok 1 - Hidden package does not cause exceptions
#   Failed test 'Hidden package does not cause exceptions'
#   at /tmp/devel_hide.pl line 20.
# Can't locate I/Do/Not/Exist.pm (hidden)
# Compilation failed in require at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Module/Runtime.pm line 317.
1..1
# Looks like you failed 1 test of 1.
 

There's a similar bug with Test::Without, but the symptoms are worse and croak in different places so will file a seperate bug.

Subject: devel_hide.pl
use strict; use warnings; use Test::More; BEGIN { eval { require Devel::Hide; 1 } or plan skip_all => "Devel::Hide required for this test"; } use Devel::Hide qw(I::Do::Not::Exist); use Module::Runtime qw( use_package_optimistically ); my $error; my $return; my $ok; { local $@; eval { $return = use_package_optimistically(qw( I::Do::Not::Exist )); $ok = 1 }; $error = $@; } ok( $ok, "Hidden package does not cause exceptions" ) or diag explain $error; done_testing;