diff options
author | leeym <leeym@FreeBSD.org> | 2005-07-20 09:25:05 +0800 |
---|---|---|
committer | leeym <leeym@FreeBSD.org> | 2005-07-20 09:25:05 +0800 |
commit | fc5994d2f18506a9b2b136fcd0f439ac9a2f60bf (patch) | |
tree | 1937677791c9c714bae070cefd5365add7f890ef /devel/p5-Config-Objective | |
parent | a15f163f577eb338f06c966aaed586ba43a86818 (diff) | |
download | freebsd-ports-graphics-fc5994d2f18506a9b2b136fcd0f439ac9a2f60bf.tar.gz freebsd-ports-graphics-fc5994d2f18506a9b2b136fcd0f439ac9a2f60bf.tar.zst freebsd-ports-graphics-fc5994d2f18506a9b2b136fcd0f439ac9a2f60bf.zip |
- allow more descriptive error messages
PR: 83395
Submitted by: Jim Pirzyk <pirzyk@freebsd.org>
Diffstat (limited to 'devel/p5-Config-Objective')
-rw-r--r-- | devel/p5-Config-Objective/Makefile | 2 | ||||
-rw-r--r-- | devel/p5-Config-Objective/files/patch-lib-Config-Objective.pm | 33 |
2 files changed, 34 insertions, 1 deletions
diff --git a/devel/p5-Config-Objective/Makefile b/devel/p5-Config-Objective/Makefile index 44e6a8fc5df..39ab315f28f 100644 --- a/devel/p5-Config-Objective/Makefile +++ b/devel/p5-Config-Objective/Makefile @@ -7,6 +7,7 @@ PORTNAME= Config-Objective PORTVERSION= 0.9.1 +PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITE_SUBDIR= Config @@ -21,7 +22,6 @@ RUN_DEPENDS= ${BUILD_DEPENDS} PERL_CONFIGURE= YES -MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} MAN3= Config::Objective::List.3 Config::Objective::Boolean.3 \ Config::Objective::Table.3 Config::Objective.3 \ Config::Objective::Hash.3 Config::Objective::Integer.3 \ diff --git a/devel/p5-Config-Objective/files/patch-lib-Config-Objective.pm b/devel/p5-Config-Objective/files/patch-lib-Config-Objective.pm new file mode 100644 index 00000000000..842045f6a18 --- /dev/null +++ b/devel/p5-Config-Objective/files/patch-lib-Config-Objective.pm @@ -0,0 +1,33 @@ +--- ./lib/Config/Objective.pm.sav Wed Apr 6 19:24:00 2005 ++++ ./lib/Config/Objective.pm Wed Apr 6 19:31:48 2005 +@@ -91,17 +91,21 @@ + $method = 'default' + if (!defined($method)); + +- $retval = eval { $self->{'objs'}->{$obj}->$method(@args); }; +- if ($@) ++ # ++ # Trap and extend die and warn so we can tell the user where ++ # we were when the signals were generated. ++ # ++ if (@{$self->{'lexer_stack'}}) + { +- if (@{$self->{'lexer_stack'}}) +- { +- $line = $self->{'lexer_stack'}->[-1]->line; +- $msg = "$self->{'file_stack'}->[-1]:$line: "; +- } +- $msg .= "$obj"; +- die "$msg: $@"; ++ $line = $self->{'lexer_stack'}->[-1]->line; ++ $msg = "$self->{'file_stack'}->[-1]: line $line: "; + } ++ $msg .= $obj; ++ ++ local $SIG{__DIE__} = sub { die "$msg: $_[0]"; }; ++ local $SIG{__WARN__} = sub { warn "$msg: $_[0]"; }; ++ ++ $retval = $self->{'objs'}->{$obj}->$method(@args); + + # print "<== _call_obj_method(): returning '" + # . (defined($retval) ? $retval : 'undef') . "'\n"; |