Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use UNIVERSAL is deprecated in perl 5.22 #522

Open
dpgeekzero opened this issue Jul 7, 2015 · 5 comments
Open

use UNIVERSAL is deprecated in perl 5.22 #522

dpgeekzero opened this issue Jul 7, 2015 · 5 comments
Labels
Milestone

Comments

@dpgeekzero
Copy link

I don't know perl very well, but I got mh working again by commenting out line 49 in lib/site/HTML/Formatter.pm

Error:

UNIVERSAL does not export anything at ../lib/site/HTML/Formatter.pm line 49.
 at mh line 31.
        main::__ANON__("UNIVERSAL does not export anything at ../lib/site/HTML/Format"...) called at /usr/share/perl5/core_perl/Carp.pm line 166
        Carp::croak("UNIVERSAL does not export anything") called at /usr/share/perl5/core_perl/UNIVERSAL.pm line 15
        UNIVERSAL::import("UNIVERSAL", "can") called at ../lib/site/HTML/Formatter.pm line 49
        HTML::Formatter::BEGIN() called at ../lib/site/HTML/Formatter.pm line 49
        eval {...} called at ../lib/site/HTML/Formatter.pm line 49
        require ../lib/site/HTML/Formatter.pm called at /opt/misterhouse/bin/../lib/site/HTML/FormatText.pm line 60
        require HTML/FormatText.pm called at /opt/misterhouse/bin/../lib/handy_net_utilities.pl line 29
        handy_net_utilities::BEGIN() called at ../lib/site/HTML/Formatter.pm line 49
        eval {...} called at ../lib/site/HTML/Formatter.pm line 49
        require handy_net_utilities.pl called at mh line 728
        main::setup called at mh line 6852
BEGIN failed--compilation aborted at ../lib/site/HTML/Formatter.pm line 49.
 at mh line 31.
        main::__ANON__("UNIVERSAL does not export anything at ../lib/site/HTML/Format"...) called at ../lib/site/HTML/Formatter.pm line 49
        require ../lib/site/HTML/Formatter.pm called at /opt/misterhouse/bin/../lib/site/HTML/FormatText.pm line 60
        require HTML/FormatText.pm called at /opt/misterhouse/bin/../lib/handy_net_utilities.pl line 29
        handy_net_utilities::BEGIN() called at ../lib/site/HTML/Formatter.pm line 49
        eval {...} called at ../lib/site/HTML/Formatter.pm line 49
        require handy_net_utilities.pl called at mh line 728
        main::setup called at mh line 6852
Compilation failed in require at /opt/misterhouse/bin/../lib/site/HTML/FormatText.pm line 60.
 at mh line 31.
        main::__ANON__("UNIVERSAL does not export anything at ../lib/site/HTML/Format"...) called at /opt/misterhouse/bin/../lib/site/HTML/FormatText.pm line 60
        require HTML/FormatText.pm called at /opt/misterhouse/bin/../lib/handy_net_utilities.pl line 29
        handy_net_utilities::BEGIN() called at /opt/misterhouse/bin/../lib/site/HTML/FormatText.pm line 0
        eval {...} called at /opt/misterhouse/bin/../lib/site/HTML/FormatText.pm line 0
        require handy_net_utilities.pl called at mh line 728
        main::setup called at mh line 6852
Compilation failed in require at /opt/misterhouse/bin/../lib/handy_net_utilities.pl line 29.
 at mh line 31.
        main::__ANON__("UNIVERSAL does not export anything at ../lib/site/HTML/Format"...) called at /opt/misterhouse/bin/../lib/handy_net_utilities.pl line 29
        handy_net_utilities::BEGIN() called at /opt/misterhouse/bin/../lib/handy_net_utilities.pl line 29
        eval {...} called at /opt/misterhouse/bin/../lib/handy_net_utilities.pl line 29
        require handy_net_utilities.pl called at mh line 728
        main::setup called at mh line 6852
BEGIN failed--compilation aborted at /opt/misterhouse/bin/../lib/handy_net_utilities.pl line 29.
 at mh line 31.
        main::__ANON__("UNIVERSAL does not export anything at ../lib/site/HTML/Format"...) called at /opt/misterhouse/bin/../lib/handy_net_utilities.pl line 29
        require handy_net_utilities.pl called at mh line 728
        main::setup called at mh line 6852
Compilation failed in require at mh line 728.
 at mh line 31.
        main::__ANON__("UNIVERSAL does not export anything at ../lib/site/HTML/Format"...) called at mh line 728
        main::setup called at mh line 6852
mh rc=255
mh failed on startup ... will not restart
@dpgeekzero
Copy link
Author

It looks like the use statement isn't required: http://perldoc.perl.org/UNIVERSAL.html

@hollie
Copy link
Owner

hollie commented Jul 7, 2015

Hey @dpgeekzero

thank you for the report.

According to me the problem is that the HTML::Formatter module that is delivered with MisterHouse under lib/site is not the most recente one. The most recent version is v2.11).
The version that comes with MisterHouse is 9 years old.

To get around this for the time being you can either patch the file as you did or you could install the HTML::Formatter module with CPAN on your system and remove the version under lib/site.

Perl will search for the module under lib/site first and if it does not find it there, it will search in your Perl library path on your system.

Regards,
Lieven.

@hollie hollie added this to the IA7 milestone Jul 7, 2015
@hollie hollie added the bug label Jul 7, 2015
@dpgeekzero
Copy link
Author

@hollie: Thanks!

@Stormwind99
Copy link

More distros have upgraded perl now - I just hit this problem after updating from Fedora 22 to 24.

@keynet
Copy link

keynet commented May 28, 2019

Me too - in perl 5.26 (Opensuse Leap 15). I removed the version of HTML::Formatter provided by MH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants