Two serious problems #1656
pgpleroux
started this conversation in
Potential issues
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your experience
Problems
Now the bugs
I would suggest always 'use strict'!
Use of eval 'use $class"
More serious - circular class reference
Expected behavior
Strange that no-one saw this?
Anyone using perlcritic?
How to reproduce it
See code
Code example
#!/usr/bin/perl
use strict;
use warnings;
use Class::Load;
warn "eval = 'Foobar': " . eval ('use Foobar') ? 'eval Foobar ok' : 'eval Foobar failed';
warn "eval = 'YAML': " . eval ('use YAML') ? 'eval YAML ok' : 'eval YAML failed';
warn "class = 'Foobar': " . Class::Load::is_class_loaded('Foobar') ? 'Foobar ok' : 'Foobar failed';
warn "class = 'YAML': " . Class::Load::is_class_loaded('use YAML') ? 'YAML ok' : 'YAML failed';
Additional context
No response
Rex version
1.16.2
Installation method
dzil install
Perl version
v5.40.1
Operating system running rex
Devuan Excalibur
Operating system managed by rex
local
Beta Was this translation helpful? Give feedback.
All reactions