diff options
author | Peter Palfrader <peter@palfrader.org> | 2002-07-10 13:01:03 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2002-07-10 13:01:03 +0000 |
commit | 7324ab910c310a1e5949b4e2437624429f8b2810 (patch) | |
tree | b6cd197050b288f3d99de97e869be192ab0170f5 /Echolot | |
parent | 9760644a9e83a93e6aecb3e01fc72a41874e25ec (diff) |
Die when you cannot parse metadata or conf
Diffstat (limited to 'Echolot')
-rw-r--r-- | Echolot/Config.pm | 6 | ||||
-rw-r--r-- | Echolot/Storage/File.pm | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Echolot/Config.pm b/Echolot/Config.pm index 8861873..789ccac 100644 --- a/Echolot/Config.pm +++ b/Echolot/Config.pm @@ -1,7 +1,7 @@ package Echolot::Config; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: Config.pm,v 1.18 2002/07/10 11:49:41 weasel Exp $ +# $Id: Config.pm,v 1.19 2002/07/10 13:01:03 weasel Exp $ # =pod @@ -139,13 +139,13 @@ sub init($) { { local $/ = undef; open(CONFIGCODE, $configfile) or - carp("Could not open configfile '$configfile': $!"); + croak("Could not open configfile '$configfile': $!"); my $config_code = <CONFIGCODE>; close (CONFIGCODE); ($config_code) = $config_code =~ /^(.*)$/s; eval ($config_code); ($EVAL_ERROR) and - carp("Evaling config code from '$configfile' returned error: $EVAL_ERROR"); + croak("Evaling config code from '$configfile' returned error: $EVAL_ERROR"); } for my $key (keys %$DEFAULT) { diff --git a/Echolot/Storage/File.pm b/Echolot/Storage/File.pm index ae8261d..68b5242 100644 --- a/Echolot/Storage/File.pm +++ b/Echolot/Storage/File.pm @@ -1,7 +1,7 @@ package Echolot::Storage::File; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: File.pm,v 1.29 2002/07/10 11:54:52 weasel Exp $ +# $Id: File.pm,v 1.30 2002/07/10 13:01:03 weasel Exp $ # =pod @@ -172,7 +172,7 @@ sub metadata_read($) { $self->{'METADATA'} = $METADATA; }; $EVAL_ERROR and - cluck("Error when reading from metadata file: $EVAL_ERROR"), + croak("Error when reading from metadata file: $EVAL_ERROR"), return 0; defined($self->{'METADATA'}->{'version'}) or |