- my ($self) = @_;
- untie %{ $self->[0] };
-
- # I'd like to use *{ $self->[0] } = $self->[1]->(); here,
- # but that causes all sorts of problems. The hash is accessible from
- # within this sub, but not where its creation was triggered.
- # Immediately after the triggering statement, the hash becomes available
- # to all: even the scope where the previous access attempt failed.
-
- %{ $self->[0] } = %{ $self->[1]->() }
+ my ($self) = @_;
+ untie %{ $self->[0] };
+
+ # I'd like to use *{ $self->[0] } = $self->[1]->(); here,
+ # but that causes all sorts of problems. The hash is accessible from
+ # within this sub, but not where its creation was triggered.
+ # Immediately after the triggering statement, the hash becomes available
+ # to all: even the scope where the previous access attempt failed.
+
+ %{ $self->[0] } = %{ $self->[1]->() }
- # my ($class, $hash, $source) = @_;
- return bless [ @_[1, 2] ], $_[0];
+ # my ($class, $hash, $source) = @_;
+ return bless [ @_[1, 2] ], $_[0];
- my ($self, $key, $value) = @_;
- $self->_replace;
- return $self->[0]->{$key} = $value;
+ my ($self, $key, $value) = @_;
+ $self->_replace;
+ return $self->[0]->{$key} = $value;