Subject: | Bad error message if mistyped options are used |
The error message could be improved if a mistyped key is used in
Text::CSV::Encoded's constructor. Currently it looks like following:
# sample
my $csv = Text::CSV::Encoded->new({mistyped_key => "\012"});
# output
Can't call method "coder_class" on an undefined value at
/usr/local/share/perl/5.8.8/Text/CSV/Encoded.pm line 60.
Possibly it's best to change the constructor call to die on errors, with
the diagnosis output:
my $self = $class->SUPER::new( $opt )
or die "" . $class->error_diag;
Regards,
Slaven