TStanley has asked for the wisdom of the Perl Monks concerning the following question:
eval{ $CY1->set_value("INI","lf2"); }; ok( $@ eq "Can't Change Internal Parameter" , "Catch attempted changin +g of internal parameter");
The problem:sub set_value{ my ($self,$section,$para,$value)=@_; croak"Can't Change Internal Parameter" if $section~=/^INI|CM$/i; croak"Missing arguments" if scalar @_ < 4; croak"Non-Existent section" if !exists $self->{$section}; croak"Non-Existent parameter" if !exists $self->{$section}->{$para}; $self->{$section}->{$para}->[0]=$value; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Module test problem
by jdporter (Paladin) on Nov 26, 2003 at 13:52 UTC | |
by TStanley (Canon) on Nov 26, 2003 at 13:56 UTC | |
|
Re: Module test problem
by TStanley (Canon) on Nov 27, 2003 at 03:32 UTC |