CGI-SSI_Parser

 view release on metacpan or  search on metacpan

SSI_Parser.pm  view on Meta::CPAN

	}
	close(FIN);
}

# Usage:         ssi_fsize_file($file);
#
sub ssi_fsize_file {
	my $file = shift;
	my $size;

	$size = (stat("$file"))[7];
	if ($sizefmt == $SIZEFMT_KMG) {
		if ($size/1048576 >= 1) { # 1024*1024
			$size = sprintf("%.1fM", $size/1048576);
		} else {
			$size = ceil($size/1024) . "k";
		}
	}
	print FOUT $size;
}

SSI_Parser.pm  view on Meta::CPAN

	$file = "$ENV{'DOCUMENT_ROOT'}/$file";
	ssi_fsize_file($file);
}

# Usage:         ssi_flastmod_file($file);
#
sub ssi_flastmod_file {
	my $file = shift;
	my $lastmod;

	$lastmod = (stat("$file"))[9];
	$lastmod = strftime($timefmt, localtime($lastmod));
	print FOUT $lastmod;
}

# Usage:         ssi_flastmod_virtual($file);
#
sub ssi_flastmod_virtual {
	my $file = shift;

	$file = "$ENV{'DOCUMENT_ROOT'}/$file";



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