diff Lib/IMPL/Config/Resolve.pm @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents 76515373dac0
children e743a8481327
line wrap: on
line diff
--- a/Lib/IMPL/Config/Resolve.pm	Tue Apr 10 08:13:22 2012 +0400
+++ b/Lib/IMPL/Config/Resolve.pm	Tue Apr 10 20:08:29 2012 +0400
@@ -6,71 +6,71 @@
 use IMPL::Exception;
 
 BEGIN {
-	public property path => prop_all|prop_list;
+    public property path => prop_all|prop_list;
 }
 
 __PACKAGE__->PassThroughArgs;
 
 sub CTOR {
-	my $this = shift;
-	
-	my $list = $this->path;
-	
-	while(my $name = shift ) {
-		my $args = shift;
-		$list->Append({ method => $name, (defined $args ? (args => $args) : ()) });
-	}
-	
-	die new IMPL::InvalidArgumentException("The argument is mandatory","path") unless $this->path->Count;
+    my $this = shift;
+    
+    my $list = $this->path;
+    
+    while(my $name = shift ) {
+        my $args = shift;
+        $list->Append({ method => $name, (defined $args ? (args => $args) : ()) });
+    }
+    
+    die new IMPL::InvalidArgumentException("The argument is mandatory","path") unless $this->path->Count;
 }
 
 sub Invoke {
-	my ($this,$target,$default) = @_;
-	
-	my $result = $target;
-	$result = $this->_InvokeMember($result,$_) || return $default foreach $this->path;
-	
-	return $result;
+    my ($this,$target,$default) = @_;
+    
+    my $result = $target;
+    $result = $this->_InvokeMember($result,$_) || return $default foreach $this->path;
+    
+    return $result;
 }
 
 sub _InvokeMember {
-	my ($self,$object,$member) = @_;
-	
-	my $method = $member->{method};
-	
-	local $@;
-	return eval {
-		ref $object eq 'HASH' ?
-			$object->{$method}
-			:
-			$object->$method(
-				exists $member->{args} ?
-					_as_list($member->{args})
-					:
-					()
-			)
-	};
+    my ($self,$object,$member) = @_;
+    
+    my $method = $member->{method};
+    
+    local $@;
+    return eval {
+        ref $object eq 'HASH' ?
+            $object->{$method}
+            :
+            $object->$method(
+                exists $member->{args} ?
+                    _as_list($member->{args})
+                    :
+                    ()
+            )
+    };
 }
 
 sub save {
-	my ($this,$ctx) = @_;
-	
-	$ctx->AddVar($_->{method},$_->{args}) foreach $this->path;
+    my ($this,$ctx) = @_;
+    
+    $ctx->AddVar($_->{method},$_->{args}) foreach $this->path;
 }
 
 sub _as_list {
-	ref $_[0] ?
-		(ref $_[0] eq 'HASH' ?
-			%{$_[0]}
-			:
-			(ref $_[0] eq 'ARRAY'?
-				@{$_[0]}
-				:
-				$_[0]
-			)
-		)
-		:
-		($_[0]);
+    ref $_[0] ?
+        (ref $_[0] eq 'HASH' ?
+            %{$_[0]}
+            :
+            (ref $_[0] eq 'ARRAY'?
+                @{$_[0]}
+                :
+                $_[0]
+            )
+        )
+        :
+        ($_[0]);
 }
 
 1;