CGI-Framework

 view release on metacpan or  search on metacpan

lib/CGI/Framework.pm  view on Meta::CPAN

	my $self = _getself(\@_);
	my $initial_template = shift || croak "initial template not supplied";
	$self->{initial_template} = $initial_template;
}

#
# An alias to new(), to be used in nooop mode
#
sub initialize_cgi_framework {
	my %para = ref($_[0]) eq "HASH" ? %{ $_[0] } : @_;
	$para{callbacks_namespace} ||= (caller)[0] || "main";
	return new("CGI::Framework", \%para);
}

#
# The constructor.  Initializes pretty much everything, returns a new bless()ed instance
#
sub new {
	my $class = shift || "CGI::Framework";
	my %para = ref($_[0]) eq "HASH" ? %{ $_[0] } : @_;
	my $self = {};

lib/CGI/Framework.pm  view on Meta::CPAN


	#
	# Some initial setup
	#
	$para{_html} = {};

	#
	# We set some defaults if unsupplied
	#
	$para{valid_languages} ||= [];
	$para{callbacks_namespace} ||= (caller)[0] || "main";
	if (!$para{cookie_name}) {
		$para{cookie_name} = "sessionid_$ENV{SCRIPT_NAME}";
		$para{cookie_name} =~ s/[^0-9a-z]//gi;
	}
	if (!$para{sessions_mysql_dbh} && !$para{sessions_dir}) {

		#
		# They didn't supply any sessions stuff, so let's take a guess at some directories for file-based storage:
		#
		foreach (qw(/tmp /var/tmp c:/tmp c:/temp c:/windows/temp)) {



( run in 0.634 second using v1.01-cache-2.11-cpan-a3c8064c92c )