changeset 317:96a522aeb359

small fixes
author cin
date Thu, 09 May 2013 04:10:00 +0400
parents 608beb8b3c6c
children 1838bdb4d238
files Lib/IMPL/TypeKeyedCollection.pm
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;