sub allow_morph { 1 }
# OR
my $app = MyApp->new({allow_morph => 1});
####
sub test_step_module_package { 'MyTestStepModule' }
####
#!/usr/bin/perl -w
package Foo;
use strict;
use warnings;
use base qw(CGI::Ex::App);
Foo->navigate;
sub allow_morph { 1 }
package Foo::Main;
use base qw(Foo);
sub file_print { return \ "Great! You got here!\n" }
####
Content-Type: text/html
Great! You got here!
####
use CGI::Ex::Dump qw(debug);
sub post_navigate {
debug shift->dump_history;
}
####
debug: cgi-bin/foo.pl line 15
shift->dump_history = [
"Elapsed: 0.07506",
"main - morph - morph (changed Foo to Foo::Main) - 0.00000 - 1",
"main - morph_package - morph_package - 0.00004 - Foo::Main",
"main - run_step - run_step - 0.03927 - 1",
" main - pre_step - pre_step - 0.00001 - 0",
" main - skip - skip - 0.00001 - 0",
" main - prepare - prepare - 0.00001 - 1",
" main - info_complete - info_complete - 0.00005 - 0",
" main - ready_validate - ready_validate - 0.00001 - 0",
" main - prepared_print - prepared_print - 0.03901 - 1",
" main - hash_base - hash_base - 0.00005 - HASH(0x831890c)",
" main - hash_common - hash_common - 0.00001 - {}",
" main - hash_form - hash_form - 0.00002 - {}",
" main - hash_fill - hash_fill - 0.00001 - {}",
" main - hash_swap - hash_swap - 0.00001 - {}",
" main - hash_errors - hash_errors - 0.00001 - {}",
" main - print - print - 0.03871 - 1",
" main - file_print - file_print - 0.00001 - SCALAR(0x825f7a0)",
" main - swap_template - swap_template - 0.03488 - Great! You got here!\n",
" main - template_args - template_args - 0.00001 - HASH(0x8335aac)",
" main - fill_template - fill_template - 0.00319 - 1",
" main - fill_args - fill_args - 0.00001 - {}",
" main - print_out - print_out - 0.00047 - 1",
" main - post_print - post_print - 0.00001 - 0",
"main - unmorph - unmorph (changed from Foo::Main to Foo) - 0.00000 - 1"
];