# HG changeset patch # User sergey # Date 1399506797 -14400 # Node ID 38cb0b80e88e1ecf2aa1bae9054c0a7d4636df6f # Parent 73f81f4e95705cc1e9762445649cd2b810e57e16 minor changes diff -r 73f81f4e9570 -r 38cb0b80e88e Lib/IMPL/Web/Handler/ErrorHandler.pm --- a/Lib/IMPL/Web/Handler/ErrorHandler.pm Mon May 05 18:17:03 2014 +0400 +++ b/Lib/IMPL/Web/Handler/ErrorHandler.pm Thu May 08 03:53:17 2014 +0400 @@ -18,7 +18,6 @@ props => [ errors => PROP_RW, view => PROP_RW, - layout => PROP_RW, fallback => PROP_RW, contentType => PROP_RW ] @@ -60,9 +59,7 @@ my $text = $this->view->display( $err, $this->errors->{$code} || $this->fallback, - { - layout => $this->layout - } + $vars ); $result = HttpResponse->new( diff -r 73f81f4e9570 -r 38cb0b80e88e Lib/IMPL/Web/View/TTContext.pm --- a/Lib/IMPL/Web/View/TTContext.pm Mon May 05 18:17:03 2014 +0400 +++ b/Lib/IMPL/Web/View/TTContext.pm Thu May 08 03:53:17 2014 +0400 @@ -121,6 +121,7 @@ if $info; } else { if( my $tt = eval { $this->template($file) } ) { + #warn " found: $file"; my $class; if ($class = $tt->class) { $class = $this->aliases->{$class} || $class; @@ -139,6 +140,8 @@ } else { my $err = $@; + #warn " not found: $err"; + for(my $t = $err; is($t,'Template::Exception'); $t = $t->info ) { die $err unless $t->type eq Template::Constants::ERROR_FILE; } diff -r 73f81f4e9570 -r 38cb0b80e88e _test/temp.pl --- a/_test/temp.pl Mon May 05 18:17:03 2014 +0400 +++ b/_test/temp.pl Thu May 08 03:53:17 2014 +0400 @@ -1,31 +1,11 @@ #!/usr/bin/perl use strict; -use Time::HiRes qw(gettimeofday tv_interval); - -my $hash = { - x => 2.0, - y => 2.0, - z => 2.3, - w => 1.0 -}; - -my $t = [gettimeofday]; +my $p = 'sometype'; +my $c = 'My::App::aSomeType'; -for(my $i = 0; $i < 1000000; $i ++) { - $hash->{x} = $i; -} - - -print "HASH: ",tv_interval($t,[gettimeofday]),"\n"; - +my $suffix = substr($c, -length($p)); +my $prefix = substr($c, 0, -length($p)); +print join ("\n",$suffix,$prefix,$p,$c), "\n"; -my $array = [2,2,2.3,1.0]; - -$t = [gettimeofday]; - -for(my $i = 0; $i < 1000000; $i ++) { - $array->[1] = $i; -} - -print "ARRAY: ",tv_interval($t,[gettimeofday]),"\n"; \ No newline at end of file +print $prefix && not(substr($prefix,-2) eq '::') ? 'corrupted' : 'class' ; \ No newline at end of file