Apache-Syntax-Highlight-Perl
view release on metacpan or search on metacpan
lib/Apache/Syntax/Highlight/Perl.pm view on Meta::CPAN
# File needs to be processed
if ( ! defined $stat{$key} || $mtime > $stat{$key} ) {
$stat{$key} = $mtime;
$have_to_cache = 1;
print STDERR "[$$] We have to cache!\n" if $debug;
}
# We have already in cache
else {
$str = get_cache( file => $key, dir => $r->dir_config('HighlightCacheDir') || '/tmp', debug => $debug );
}
use Data::Dumper;
print STDERR ("[$$] " . $r->filename . "\n" . Dumper(\%stat)) if $debug;
}
# When we must highlight?
if ( $have_to_cache || ! $str ) {
print STDERR "[$$] Generating highlight...\n" if $debug;
my $formatter = new Syntax::Highlight::Perl;
( run in 0.252 second using v1.01-cache-2.11-cpan-4d50c553e7e )