comparison Lib/IMPL/Code/Loader.pm @ 278:4ddb27ff4a0b

core refactoring
author cin
date Mon, 04 Feb 2013 02:10:37 +0400
parents 8d36073411b1
children
comparison
equal deleted inserted replaced
277:6585464c4664 278:4ddb27ff4a0b
40 my ($this,$package) = @_; 40 my ($this,$package) = @_;
41 41
42 if ($this->verifyNames) { 42 if ($this->verifyNames) {
43 $package =~ m/^([a-zA-Z_0-9]+(?:::[a-zA-Z_0-9]+)*)$/ 43 $package =~ m/^([a-zA-Z_0-9]+(?:::[a-zA-Z_0-9]+)*)$/
44 or die ArgumentException->new(package => 'Invalid package name') ; 44 or die ArgumentException->new(package => 'Invalid package name') ;
45 $package = $1;
45 } 46 }
46 47
47 $package = $this->prefix . '::' . $package if $this->prefix; 48 $package = $this->prefix . '::' . $package if $this->prefix;
48 49
49 my $file = join('/', split(/::/,$package)) . ".pm"; 50 my $file = join('/', split(/::/,$package)) . ".pm";