changeset 179:b3d91ff7aea9

minor changes
author sourcer
date Tue, 20 Dec 2011 23:00:30 +0300
parents 658a80d19d33
children d1676be8afcc
files Lib/IMPL/Class/Property/Direct.pm Lib/IMPL/Config.pm _test/Test/Lang.pm
diffstat 3 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/IMPL/Class/Property/Direct.pm	Wed Oct 12 00:06:07 2011 +0300
+++ b/Lib/IMPL/Class/Property/Direct.pm	Tue Dec 20 23:00:30 2011 +0300
@@ -8,7 +8,7 @@
 use IMPL::Class::Property;
 require IMPL::Exception;
 
-__PACKAGE__->mk_accessors qw(ExportField);
+__PACKAGE__->mk_accessors( qw(ExportField) );
 
 sub factoryParams {
 	$_[0]->SUPER::factoryParams, qw($field);
@@ -78,7 +78,7 @@
 sub FieldName {
     my ($self,$propInfo) = @_;
     
-    my ($class,$name) = $propInfo->get qw(Class Name);
+    my ($class,$name) = $propInfo->get( qw(Class Name) );
     (my $field = "${class}_$name") =~ s/::/_/g;
     return $field;
 }
--- a/Lib/IMPL/Config.pm	Wed Oct 12 00:06:07 2011 +0300
+++ b/Lib/IMPL/Config.pm	Tue Dec 20 23:00:30 2011 +0300
@@ -92,6 +92,10 @@
 
 sub spawn {
 	my ($this,$file) = @_;
+	unless ($file) {
+		($file = ref $this || $this) =~ s/:+/./g;
+		$file .= ".xml";
+	}
 	return $this->LoadXMLFile( File::Spec->catfile($ConfigBase,$file) );
 }
 
--- a/_test/Test/Lang.pm	Wed Oct 12 00:06:07 2011 +0300
+++ b/_test/Test/Lang.pm	Tue Dec 20 23:00:30 2011 +0300
@@ -6,6 +6,7 @@
 
 use IMPL::Test qw(test failed assert);
 use IMPL::lang qw(:hash :compare clone);
+use Scalar::Util qw(reftype);
 
 __PACKAGE__->PassThroughArgs;
 
@@ -82,7 +83,7 @@
 	
 	assert(not defined $b);
 	
-	my $lp = { a => '1' };
+	my $lp = { a => '1', rx => qr/abc$/ };
 	$lp->{b} = $lp;
 	
 	my $c = clone($lp); 
@@ -90,6 +91,7 @@
 	assert($c);
 	assert($c->{b});
 	assert($c->{b} == $c);
+	assert(reftype $c->{rx} eq 'REGEXP');
 	
 };