Opened 14 years ago

Closed 14 years ago

#211 closed defect (fixed)

perl Buil.PL gives confusing error message when Module::Build not installed

Reported by: Kake Owned by: Andrew Black
Priority: normal Milestone:
Component: openguides Version: svn
Severity: normal Keywords: hackfestsummer2007-reviewed
Cc:

Description

If you have Config::Tiny installed but don't have one of Module::Build and Class::Accessor, the error message you get from 'perl Build.PL' is confusing:

"Config::Tiny is required to configure this application."

Attachments (3)

Build_PL_errorclarification.patch (363 bytes) - added by Andrew Black 14 years ago.
test_without.pl (226 bytes) - added by Andrew Black 14 years ago.
test_output.txt (1.1 KB) - added by Andrew Black 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 14 years ago by Andrew Black

Owner: changed from Nobody to Andrew Black
Status: newassigned

comment:2 Changed 14 years ago by Kake

Keywords: hackfestsummer2007-reviewed added

comment:3 Changed 14 years ago by Andrew Black

my feeling is that it is trying to be helpful but it can't do so.

eval {
    require Config::Tiny;
};
die "Config::Tiny is required to configure this application.\n" if $@;

Looks OK

eval {
    require OpenGuides::Build;
    require OpenGuides::Config;
};
die "???? is required to configure this application.\n" if $@;

isn't going to work as the problem is one of a number of modules called by OpenGuides::Build.

We could do

die "£@" if $@;

I would be inclinded just do to

use OpenGuides::Build;
use OpenGuides::Config;

And make it truthful rather than friendly (and loosing information)

Changed 14 years ago by Andrew Black

Changed 14 years ago by Andrew Black

Attachment: test_without.pl added

Changed 14 years ago by Andrew Black

Attachment: test_output.txt added

comment:4 Changed 14 years ago by Dominic Hargreaves

Resolution: fixed
Status: assignedclosed

(In [1058]) Clarify error message with missing build deps (patch from andrewb) (fixes #211)

Note: See TracTickets for help on using tickets.