in reply to Re^2: diagnostics: warning, deprecation, error
in thread diagnostics: warning, deprecation, error

Do you have a point or a question?

  • Comment on Re^3: diagnostics: warning, deprecation, error

Replies are listed 'Best First'.
Re^4: diagnostics: warning, deprecation, error
by Anonymous Monk on Feb 14, 2026 at 21:32 UTC
    Usual perl error:
    perl -MSuper::Duper -e 'print Super::Duper->new->thing'

    Can't locate Super/Duper.pm in @INC (you may need to install the Super::Duper module) (@INC entries checked: /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0/darwin-2level /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0 /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0/darwin-2level /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0).
    BEGIN failed--compilation aborted.
    

    Improved perl error:
    perl -MIPC::Cmd=run -le '@_=run(command=>"perl -MSuper::Duper");$_=joi +n"",@{$_[2]};s/ ([\(])/\n/g;s/ ([\/])/\n $1/g;s/\)//g;chomp;print'

    Can't locate Super/Duper.pm in @INC
    you may need to install the Super::Duper module
    @INC entries checked:
     /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0/darwin-2level
     /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0
     /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0/darwin-2level
     /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0.
    BEGIN failed--compilation aborted.
    

    Ideal perl error? (formatted nice like perl -v):
    Can't locate Super/Duper.pm in @INC
    See: perldoc -v @INC
    
    You may need to install the Super::Duper module!
    https://metacpan.org/search?q=Super::Duper
    
    @INC entries checked:
     /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0/darwin-2level
     /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0
     /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0/darwin-2level
     /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0.
    
    BEGIN failed--compilation aborted.
    

      This is much nicer, and I guess I've always just accepted the way it is now for historic reasons, it looked liked this since I first experienced it, and I knew what it meant and what to do. I'm putting together a patch that makes it look like your suggestion:

      ./perl -MDerp::Derp Can't locate Derp/Derp.pm in @INC See: perldoc -v @INC You may need to install the Derp::Derp module: https://metacpan.org/search?q=Derp::Derp @INC entries checked: /home/marto/localperl/lib/site_perl/5.42.0/x86_64-linux /home/marto/localperl/lib/site_perl/5.42.0 /home/marto/localperl/lib/5.42.0/x86_64-linux /home/marto/localperl/lib/5.42.0. BEGIN failed--compilation aborted. ~/localperl/bin

      But need to fix the breaking tests that go looking for the old format in:

      Failed 5 tests out of 2667, 99.81% okay. ../cpan/Test-Simple/t/Legacy/fail-more.t ../cpan/parent/t/parent.t op/inccode-tie.t op/inccode.t op/require_errors.t
        I've been rethinking this as someone who spends a lot of time with perl at the command line. I think the reason for suggesting a cleanup on the missing module error is that there's a lot of information and it's a mess. I noticed that everything inside parenthesis looks as if it was hastily added at some point and isn't really necessary. It might be nicer to have perl puke less text upon this error than more:
        Can't locate Super/Duper.pm in @INC
        BEGIN failed--compilation aborted.
        

        You two removed the crucial file and line number.