comparison Lib/IMPL/Code/Loader.pm @ 229:47f77e6409f7

heavily reworked the resource model of the web application: *some ResourcesContraact functionality moved to Resource +Added CustomResource *Corrected action handlers
author sergey
date Sat, 29 Sep 2012 02:34:47 +0400
parents a8db61d0ed33
children 6d8092d8ce1b
comparison
equal deleted inserted replaced
228:431db7034a88 229:47f77e6409f7
33 33
34 sub Require { 34 sub Require {
35 my ($this,$package) = @_; 35 my ($this,$package) = @_;
36 36
37 if ($this->verifyNames) { 37 if ($this->verifyNames) {
38 $package =~ m/^([a-zA-Z_0-9]+(?:::[a-zA-Z_0-9]+)*)$/ or die ArgumentException->new("package") ; 38 $package =~ m/^([a-zA-Z_0-9]+(?:::[a-zA-Z_0-9]+)*)$/
39 or die ArgumentException->new(package => 'Invalid package name') ;
39 } 40 }
40 41
41 $package = $this->prefix . $package if $this->prefix; 42 $package = $this->prefix . '::' . $package if $this->prefix;
42 43
43 my $file = join('/', split(/::/,$package)) . ".pm"; 44 my $file = join('/', split(/::/,$package)) . ".pm";
44 45
45 require $file; 46 require $file;
46 } 47 }