use Maypole::Constants;
use Maypole::Headers;
-our $VERSION = '2.09';
+our $VERSION = '2.10_pre2a';
__PACKAGE__->mk_classdata($_) for qw( config init_done view_object );
__PACKAGE__->mk_accessors(
my $config = $calling_class->config;
$config->model || $config->model("Maypole::Model::CDBI");
$config->model->require;
- die "Couldn't load the model class $config->model: $@" if $@;
+ die "Couldn't load the model class $config->{model}: $@" if $@;
$config->model->setup_database( $config, $calling_class, @_ );
for my $subclass ( @{ $config->classes } ) {
no strict 'refs';
die "Do not use Maypole directly; use Apache::MVC or similar";
}
+# Session and Repeat Submission Handling
+
+sub make_random_id {
+ use Maypole::Session;
+ return Maypole::Session::generate_unique_id();
+}
+
=head1 NAME
Maypole - MVC web application framework
can handle exceptions the user, or falls back to the default
exception method of your Maypole application.
+=head3 make_random_id
+
+returns a unique id for this request can be used to prevent or detect repeat submissions.
=head3 handler