# # Called if the user submits an invalid run mode / node. # sub invalidnode { my ($self) = @_; # Get the node the user tried to use. my $q = $self->query(); my $node = $q->param("node"); if ( $node =~ /^([a-z]+)$/ ) { $node = $1; if ( -e "./templates/$node.tmpl" ) { my $html = $self->load_tmpl( "templates/$node.tmpl", global_vars => 1, ); return ( $html->output ); } } my $html = $self->load_tmpl( "templates/error.tmpl", global_vars => 1, ); return ( $html->output ); } #### $self->run_modes( 'home' => 'home', ..... 'AUTOLOAD' => 'invalidnode' );