Creating a Module called Foo
Create
Create lib/WWW/Battie/Modules/Foo.pm
lib/WWW/Battie/Modules/Foo.pm
package WWW::Battie::Modules::Foo;
use strict;
use warnings;
use Carp qw(carp croak);
use base qw/ WWW::Battie::Module::Model Class::Accessor::Fast /;
my %functions = (
functions => {
foo => {
start => 1,
init => {
on_run => 1,
},
},
},
);
sub functions { %functions }
sub default_actions {
my ($class, $battie) = @_;
return {
guest => [qw/ start /],
user => [qw/ /],
};
}
sub model {
foo => 'WWW::Battie::Schema::Foo',
}
sub title {
return 'Foo'
}
sub foo__start {
}
1;
Create lib/WWW/Battie/Schema/Foo.pm
to be continued...