Apache2-AutoIndex-XSLT

 view release on metacpan or  search on metacpan

examples/fakeup.pl  view on Meta::CPAN

#!/usr/bin/perl -w

use strict;
use Data::Dumper;

use constant PRINTF => '%y\t%m\t%M\t%n\t%U\t%u\t%G\t%g\t%s\t%TY-%Tm-%Td '.
					'%TH:%TM\t%T@\t%CY-%Cm-%Cd %CH:%CM\t%C@\t%h\t%f\t%p\n';
use constant PRINTF_FIELDS => qw(type mode perms links uid owner gid
	group size mtime unixmtime ctime unixctime path filename absfile);

my %data;

my $cmd = sprintf('find . -printf "%s"',PRINTF);
open(PH,'-|',$cmd) || die "Unable to open file handle PH for command '$cmd': $!";

examples/filetypes.pl  view on Meta::CPAN

#!/usr/bin/perl -w

use strict;
use Data::Dumper;

my %data;
my $ext = '';
while (local $_ = <>) {
	if (my ($k,$v) = $_ =~ /^\s*(\S+)\s*:\s*(\S.*?)\s*$/) {
		if ($k =~ /ext(ension)?/i) {
			$v =~ s/^\.//;
			$ext = $v || '';
		} elsif ($v) {
			$data{$ext}->{$k} = $v;

lib/Apache2/AutoIndex/XSLT.pm  view on Meta::CPAN

		$secs{"2: Virtual Host"} = $srv_cfg;
		$secs{"3: Location"}     = $dir_cfg;
	} else {
		$secs{"1: Main Server"}  = $srv_cfg;
		$secs{"2: Location"}     = $dir_cfg;
	}
  
	$rtn .= sprintf("Processing by %s.\n", 
	$s->is_virtual ? "virtual host" : "main server");

	require Data::Dumper;
	no warnings 'once';
	local $Data::Dumper::Terse = 1;
	local $Data::Dumper::Deepcopy = 1;
	local $Data::Dumper::Sortkeys = 1;
	$rtn = Data::Dumper::Dumper(\%secs);

	return $rtn;
}
 
sub get_config {
	Apache2::Module::get_config(__PACKAGE__, @_);
}

sub AddAlt {
	push_val_on_key('AddAlt', $_[0], $_[1], join(' ',$_[2],$_[3]));



( run in 0.257 second using v1.01-cache-2.11-cpan-4d50c553e7e )