CGI-Application-Framework
view release on metacpan or search on metacpan
Alias /caf $default_examples_path/htdocs/caf-examples/
Where do you want the example files to be installed (path)?
},
choices => $default_examples_path,
default => $default_examples_path,
pre_defined => $builder->args('examples-path'), # skip question if already defined
);
# Make a guess at the examples url by taking the last element
# of $examples_path
my ($volume, @path) = File::Spec->splitpath($examples_path);
my $default_examples_url = '/' . pop @path;
$examples_url = $builder->multiple_choice(
question_name => 'examples-url',
preamble => qq{
What is the URL to the example files?
},
choices => $default_examples_url,
ScriptAlias /caf-cgi $default_cgi_bin_path
Where do you want the cgi-bin files to be installed (path)?
},
choices => $default_cgi_bin_path,
default => $default_cgi_bin_path,
pre_defined => $builder->args('cgi-bin-path'), # skip question if already defined
);
# Make a guess at the cgi-bin url by taking the last element
# of $cgi_bin_path
($volume, @path) = File::Spec->splitpath($cgi_bin_path);
my $default_cgi_bin_url = '/' . pop @path;
$cgi_bin_url = $builder->multiple_choice(
question_name => 'cgi-bin-url',
preamble => qq{
What is the URL to the cgi-bin directory?
},
choices => $default_cgi_bin_url,
caf_project/Example/common-modules/Example.pm view on Meta::CPAN
# The combination that these return values create is interpreted
# by Framework.pm as follows:
#
# (0, undef) --> Unknown user
# (0, $user) --> user was found, incorrect password given
# (1, $user) --> user was found, password given correct
#
# ** (1, undef) --> not possible! this will never happen **
#
# Note that you are responsible for creating a login.html
# HTML::Template file (or just plain HTML file I guess
# but that's a dumb idea) that is on the template search path
# that will provide something logically equivalent to username
# and password form fields, that you will use here. You can
# name them what you want to here; Framework.pm makes
# no assumptions regarding what they should be called.
#
# Technically, you don't even need username and password fields.
# If you can creatively figure out a way to authenticate without
# these concepts then that's up to you. Framework.pm
# doesn't depend on username and password concepts.
caf_project/Example/common-modules/Example.pm view on Meta::CPAN
# The combination that these return values create is interpreted
# by Framework.pm as follows:
#
# (0, undef) --> Unknown user
# (0, $user) --> user was found, incorrect password given
# (1, $user) --> user was found, password given correct
#
# ** (1, undef) --> not possible! this will never happen **
#
# Note that you are responsible for creating a relogin.html
# HTML::Template file (or just plain HTML file I guess
# but that's a dumb idea) that is on the template search path
# that will provide something logically equivalent to a password
# form field, that you will use here. You can name them what
# you want to here; Framework.pm makes no assumptions
# regarding what they should be called.
#
# Technically, you don't even need a password field. If you can
# creatively figure out a way to authenticate without these
# concepts then that's up to you. Framework.pm doesn't
# depend on username and password concepts.
lib/CGI/Application/Framework.pm view on Meta::CPAN
If you have two applications in the same project that each need a
different database handle, then you can do this in one of two ways.
The first option is to move the database configuration into the
application-specific framework.conf:
projects/Finance/receivable/framework.conf
<db_finance>
dsn = DBI:Pg:dbname=receivables
username = abbot
password = guessme
</db_finance>
projects/Finance/payable/framework.conf
<db_finance>
dsn = DBI:mysql:database=payables
username = costello
password = letmein
</db_finance>
The other option is to use the URL matching and Application matching
features of the underlying C<Config::Context> system. For instance:
projects/framework.conf
<LocationMatch receiveables>
<db_finance>
dsn = DBI:Pg:dbname=receivables
username = abbot
password = guessme
</db_finance>
</LocationMatch>
<LocationMatch payables>
<db_finance>
dsn = DBI:mysql:database=payables
username = costello
password = letmein
</db_finance>
</LocationMatch>
lib/CGI/Application/Framework.pm view on Meta::CPAN
If you want to have multiple Apache virtual hosts running the same
C<CGI::Application::Framework> applications, then you can use the site
matching features of the configuration system:
projects/framework.conf
<Site CREDIT>
<db_finance>
dsn = DBI:Pg:dbname=receivables
username = abbot
password = guessme
</db_finance>
</Site>
<Site DEBIT>
<db_finance>
dsn = DBI:mysql:database=payables
username = costello
password = letmein
</db_finance>
</Site>
lib/CGI/Application/Framework.pm view on Meta::CPAN
$session_query =~ s/;$//;
$self->session->{_cgi_query} = $session_query;
$self->prerun_mode('relogin');
return;
# ------------------------------------------------------
} # end of if $self->_relogin_test
}
}
return; # guess that's about it...
}
# ------------------------------------------------------------------
# These methods are new and unique to CGI::Application::Framework
# ------------------------------------------------------------------
sub _make_run_mode_tag {
my $self = shift;
my %params = @_;
( run in 1.531 second using v1.01-cache-2.11-cpan-748bfb374f4 )