| | 40 | * use MooseX::Declare; |
| | 41 | * Class declaration (with extends/with if necessary) |
| | 42 | * Imported modules |
| | 43 | * Moose Accessors |
| | 44 | * Code |
| | 45 | |
| | 46 | {{{ |
| | 47 | #!perl |
| | 48 | ########################################################################### |
| | 49 | # whatbot/Module.pm |
| | 50 | ########################################################################### |
| | 51 | # the whatbot project - http://www.whatbot.org |
| | 52 | ########################################################################### |
| | 53 | |
| | 54 | use MooseX::Declare; |
| | 55 | class whatbot::Module extends whatbot { |
| | 56 | use DBI; |
| | 57 | use Digest::SHA1; |
| | 58 | use WWW::Mechanize; |
| | 59 | |
| | 60 | has 'foo' => ( is => 'rw', isa => 'Int' ); |
| | 61 | |
| | 62 | method bar { |
| | 63 | $self->whee(); |
| | 64 | } |
| | 65 | } |
| | 66 | |
| | 67 | 1; |
| | 68 | }}} |
| | 69 | * Each module should have this order (old way): |
| | 70 | * Header |