CGI-SpeedUp

 view release on metacpan or  search on metacpan

SpeedUp.pm  view on Meta::CPAN


    (my $module_name = __PACKAGE__ ) =~ s/::/-/g;
    foreach( CGI::cookie("${module_name}-header"), (exists $ENV{"${module_name}-header"} and $ENV{"${module_name}-header"})) {
		$_ and $Control->{'header'}{$_} = 1 and last;
    }

    open(OLDOUT, ">&STDOUT");  # Save real STDOUT
    open(STDOUT, ">${File_base}-out-$$");
}

sub header_control
{
    my $outfile = "";

	# Retrieve real STDOUT
	open( STDOUT, ">&OLDOUT" );

	open(my $fh, '<', "${File_base}-out-$$");

	$outfile = join '', <$fh>;
	unlink "${File_base}-out-$$";

    return(\$outfile);
}

1;

=head1 NAME

CGI::SpeedUp


=head1 SYNOPSIS

	# ONLY THIS
	use CGI::SpeedUp;
	
=head1 DESCRIPTION

The CGI::SpeedUp module provides a simple way to speed up any CGI application by managing its STDOUT and STDERR. This module was tested in a production environment.

=head1 SUBROUTINES/METHODS

All is done automagicaly. You shoud only C<use> it :-)

=head1 DEPENDENCIES

=over 4

=item CGI

=item File::Spec

=back


=head1 INCOMPATIBILITIES

None known.

=head1 BUGS AND LIMITATIONS

None known.

=head1 AUTHOR

Strzelecki Łukasz <lukasz@strzeleccy.eu>

=head1 LICENCE AND COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html



( run in 1.670 second using v1.01-cache-2.11-cpan-39bf76dae61 )