# HG changeset patch # User cin # Date 1368058200 -14400 # Node ID 96a522aeb35940683ee2c23f10d1018a3f905805 # Parent 608beb8b3c6c1bf02ea4a9ad1552ac38226f960f small fixes diff -r 608beb8b3c6c -r 96a522aeb359 Lib/IMPL/TypeKeyedCollection.pm --- a/Lib/IMPL/TypeKeyedCollection.pm Wed May 08 16:19:34 2013 +0400 +++ b/Lib/IMPL/TypeKeyedCollection.pm Thu May 09 04:10:00 2013 +0400 @@ -27,8 +27,8 @@ sub Get { my ($this,$type) = @_; - die ArgException->(type => 'Invalid type', $type) - if ref($type); + die ArgException->new(type => 'Invalid type', $type) + if not $type or ref($type); if(my $val = $this->{$_cache}{$type}) { return $val; @@ -42,7 +42,7 @@ $val = $this->{$_items}{$sclass}; - return $this->{$_cache}{$type} = $val + return($this->{$_cache}{$type} = $val) if defined $val; # zeroes and empty strings are also valid push @isa, @{"${sclass}::ISA"}; @@ -54,8 +54,8 @@ sub Set { my ($this,$type,$value) = @_; - die ArgException->(type => 'Invalid type', $type) - if ref($type); + die ArgException->new(type => 'Invalid type', $type) + if not $type or ref($type); $this->{$_items}{$type} = $value;