App-Pods2Site

 view release on metacpan or  search on metacpan

lib/App/Pods2Site/Pod2HTML.pm  view on Meta::CPAN

			my $htmlroot = ('..' x ($outfile =~ tr#/##)) || '.';
			$htmlroot =~ s#\.\.(?=\.)#../#g;
			
			# place all pod2html generated files in the pod2html dir
			#
			my $relOutFile = "pod2html/$outfile.html";
			$outfile = slashify($args->getSiteDir() . "/$relOutFile");

			$workGroup->{podinfo}->{$podName}->{htmlfile} = $outfile;

			my $mtimePodfile = (stat($podfile))[9];
			my $mtimeOutfile = (stat($outfile))[9] || 0;

			if (!-e $outfile || $mtimePodfile > $mtimeOutfile)
			{
				my $outfileDir = dirname($outfile);
				(!-d $outfileDir ? make_path($outfileDir) : 1) || die ("Failed to create directory '$outfileDir': $!\n");
				my @p2hargs =
					(
						"--infile=$podfile",
						"--outfile=$outfile",
						"--podroot=$podRoot",

lib/App/Pods2Site/PodCopier.pm  view on Meta::CPAN

	#
	my $podname = $name;
	$podname =~ s#::#/#g;
	my $outfile = slashify("$self->{podroot}/$group/$podname.pod");

	# we're copying in a specific order, and it's possible
	# a pod with the same name might come from two different categories
	# if so, only copy the first, but make sure the copy retains the mtime
	# from the infile, so the HTML gen can avoid regenerating
	#
	my $mtimeInfile = (stat($infile))[9];
	if (!-e $outfile)
	{
		my $outfileDir = dirname($outfile);
		(!-d $outfileDir ? make_path($outfileDir) : 1) || die ("Failed to create directory '$outfileDir': $!\n");
		copy($infile, $outfile) || die("Failed to copy $infile => $outfile: $!\n");
		utime($mtimeInfile, $mtimeInfile, $outfile);
	}
	
	$self->{count}++;
	



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