Bio-Das

 view release on metacpan or  search on metacpan

Das/Segment.pm  view on Meta::CPAN


    my $dir  = File::Spec->catfile($tmpdir,"$program-$user");
    mkpath($dir) or die "$dir: $!" unless -d $dir;
    my $path = File::Spec->catfile($dir,$url);

    my $stylesheet;

    eval {

	# cache for 5 minutes
	my $mtime = (stat($path))[9];
	if ($mtime && ((time() - $mtime)/60) < 5.0) {
	    open my $f,'<',$path or die "$path: $!";
	    my $s;
	    $s .= $_ while <$f>;
	    close $f;
	    my $VAR1;
	    $stylesheet = eval "$s; \$VAR1";
	    warn $@ if $@;
	    utime undef,undef,$path;
	}



( run in 1.141 second using v1.01-cache-2.11-cpan-49f99fa48dc )