diff options
| author | fukachan <fukachan> | 2001-03-11 10:36:23 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-03-11 10:36:23 +0000 |
| commit | 56705eab1439e86b49a9696979377349b70c1942 (patch) | |
| tree | 3f7f48916de9a09c1750a0d02ac34015ed1f4ac4 /fml/lib/IO/Adapter/Array.pm | |
| parent | 5827693385f9d846bacef2860467916d8a607177 (diff) | |
| download | fml8-56705eab1439e86b49a9696979377349b70c1942.tar.gz fml8-56705eab1439e86b49a9696979377349b70c1942.tar.bz2 fml8-56705eab1439e86b49a9696979377349b70c1942.zip | |
check flag since this is read only
Diffstat (limited to 'fml/lib/IO/Adapter/Array.pm')
| -rw-r--r-- | fml/lib/IO/Adapter/Array.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fml/lib/IO/Adapter/Array.pm b/fml/lib/IO/Adapter/Array.pm index 59152528..67df0278 100644 --- a/fml/lib/IO/Adapter/Array.pm +++ b/fml/lib/IO/Adapter/Array.pm @@ -83,6 +83,11 @@ sub open my $flag = $args->{ flag } || 'r'; my $r_array = $self->{ _array_reference}; + if ($flag ne 'r') { + $self->_error_reason("Error: type=$self->{_type} is read only."); + return undef; + } + # malloc() my @elements = @$r_array; $self->{_elements} = $r_array; |
