diff Lib/IMPL/Code/Loader.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 a8db61d0ed33
line wrap: on
line diff
--- a/Lib/IMPL/Code/Loader.pm	Tue Apr 10 08:13:22 2012 +0400
+++ b/Lib/IMPL/Code/Loader.pm	Tue Apr 10 20:08:29 2012 +0400
@@ -5,29 +5,29 @@
 my %packages;
 
 sub Provide {
-	my ($self,$package) = @_;
-	
-	my ($declaringPackage,$file) = caller();
-	$packages{$package} = { declaringPackage => $declaringPackage, file => $file, evidence => 'provide' };
+    my ($self,$package) = @_;
+    
+    my ($declaringPackage,$file) = caller();
+    $packages{$package} = { declaringPackage => $declaringPackage, file => $file, evidence => 'provide' };
 }
 
 sub Require {
-	my ($self,$package) = @_;
-	
-	return 1 if $packages{$package};
-	
-	if (my $file = $INC{$package}) {
-		$packages{$package} = { file => $file, evidence => 'inc' };
-		return 1;
-	} 
-	
-	undef $@;
-	
-	if ( eval "require $package; 1;" and not $packages{$package}) {
-		$packages{$package} = { file => $INC{$package}, evidence => 'inc' };
-	};
-			
-	die $@ if $@ and not $!;
+    my ($self,$package) = @_;
+    
+    return 1 if $packages{$package};
+    
+    if (my $file = $INC{$package}) {
+        $packages{$package} = { file => $file, evidence => 'inc' };
+        return 1;
+    } 
+    
+    undef $@;
+    
+    if ( eval "require $package; 1;" and not $packages{$package}) {
+        $packages{$package} = { file => $INC{$package}, evidence => 'inc' };
+    };
+            
+    die $@ if $@ and not $!;
 }
 
 1;