Show
Ignore:
Timestamp:
05/28/08 10:34:32 (5 years ago)
Author:
mattn
Message:

件数未満でも動く様に(間違ってたら直して下さい: tokuhirom)

Location:
lang/perl/App-Chariot/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/App-Chariot/trunk/lib/App/Chariot/C/Index.pm

    r12557 r12586  
    1010    my $ofile = File::Spec->catfile($c->config->output_dir, 'index.html'); 
    1111 
     12    my $size = $c->config->index_stop; 
     13    $size = (@list)-1 if $size >= @list; 
    1214    $c->render( 
    1315        $ifile => $ofile, { 
    14             entries => [ @list[0..($c->config->index_stop)] ], 
     16            entries => [ @list[0..$size] ], 
    1517        } 
    1618    ); 
  • lang/perl/App-Chariot/trunk/lib/App/Chariot/C/RSS.pm

    r12557 r12586  
    1616 
    1717    my @list = reverse @{$c->dat->list}; 
    18     for my $entry (@list[0..($c->config->index_stop)]) { 
     18    my $size = $c->config->index_stop; 
     19    $size = (@list)-1 if $size >= @list; 
     20    for my $entry (@list[0..$size]) { 
    1921        my $cnt = 1; 
    2022        for my $item (reverse @{$entry->items->list}) { 
  • lang/perl/App-Chariot/trunk/t/97_podspell.t

    r12554 r12586  
    2929kazeburo 
    3030TODO 
     31blog 
     32changelog