Changeset 23551 for lang/perl/NanoB

Show
Ignore:
Timestamp:
11/13/08 17:28:31 (5 years ago)
Author:
kazuho
Message:

optimize

Location:
lang/perl/NanoB/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/NanoB/trunk/controller/start.pl

    r23547 r23551  
    11sub run { 
    2     "HelloWorld16"; 
     2    "HelloWorld18"; 
    33} 
  • lang/perl/NanoB/trunk/nanob.cgi

    r23547 r23551  
    2323        print $fh read_file("$base_dir/wrapper.cgi"); 
    2424        print $fh read_file("$base_dir/controller/$name.pl"); 
     25        my @st = stat "$base_dir/controller/$name.pl"; 
    2526        print $fh (<< "EOT"); 
    26 check_update(\"$base_dir/nanob.cgi\", \"$base_dir/controller/$name.pl\"); 
     27check_update(\"$base_dir/nanob.cgi\", \"$base_dir/controller/$name.pl\", $st[9]); 
    2728my \$o = run(); 
    2829print headers(), \$o; 
  • lang/perl/NanoB/trunk/wrapper.cgi

    r23545 r23551  
    1919 
    2020sub check_update { 
    21     my ($nanob_cgi, $src) = @_; 
    22     my @me = stat $0; 
    23     my @orig = stat $src; 
    24     if ($me[9] < $orig[9]) { 
     21    my ($nanob_cgi, $src, $orig_mtime) = @_; 
     22    my @st = stat $src; 
     23    if ($orig_mtime != $st[9]) { 
     24        print STDERR "orig:$orig_mtime, src:$st[9]\n"; 
    2525        exec "$nanob_cgi", $0; 
    2626        die "should not reach here...$!";