Add comment on top about unique routes

This commit is contained in:
Brian Read 2025-04-24 09:59:49 +01:00
parent 93ef6c22c4
commit 6e45347ba3

View File

@ -1,6 +1,8 @@
package SrvMngr::Controller::${PackageName};
#
# Generated by ${version}
# Remember that each route must be unique (else they just overwrite each other).
# you cannot have get and post on the same name and url.
#
#----------------------------------------------------------------------
# heading : ${MenuHeading}
@ -133,7 +135,7 @@ sub do_update {
my $params = $c->req->params->to_hash;
# Get number of POST parameters
#my $num_params = keys scaler %$params;
my $num_params = keys scaler %$params;
#Params are available in the hash "params" - copy to the prefix_data hash
#while (my ($key, $value) = each %{$c->req->params->to_hash}) {
@ -215,10 +217,10 @@ sub do_display {
my $modul = "";
# Accessing all parameters
my %params = $c->req->params->to_hash;
my $params = $c->req->params->to_hash;
# Get number of parameters
my $num_params = keys %params;
my $num_params = keys %$params;
#Tag as Post or Get (ie. create new entry or edit existing one
my $is_new_record = ($c->req->method() eq 'POST');