Mercurial > pub > Impl
changeset 398:38cb0b80e88e
minor changes
author | sergey |
---|---|
date | Thu, 08 May 2014 03:53:17 +0400 |
parents | 73f81f4e9570 |
children | 753e981782ce |
files | Lib/IMPL/Web/Handler/ErrorHandler.pm Lib/IMPL/Web/View/TTContext.pm _test/temp.pl |
diffstat | 3 files changed, 10 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- 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(
--- 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; }
--- 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