| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Badger::Apps; | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | use Badger::Factory::Class | 
| 4 | 1 |  |  |  |  | 3 | version   => 0.01, | 
| 5 |  |  |  |  |  |  | debug     => 0, | 
| 6 | 1 |  |  | 1 |  | 308 | item      => 'app'; | 
|  | 1 |  |  |  |  | 2 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | sub found_module { | 
| 10 | 0 |  |  | 0 | 1 |  | my ($self, $type, $module, $args) = @_; | 
| 11 | 0 |  |  |  |  |  | $self->debug("Found module: $type => $module") if DEBUG; | 
| 12 | 0 |  | 0 |  |  |  | $self->{ loaded }->{ $module } ||= class($module)->load; | 
| 13 | 0 |  |  |  |  |  | return $module; | 
| 14 |  |  |  |  |  |  | } | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | sub not_found { | 
| 17 | 0 |  |  | 0 | 1 |  | my ($self, $type, @args) = @_; | 
| 18 | 0 |  |  |  |  |  | return $self->decline_msg( not_found => $self->{ item }, $type ); | 
| 19 |  |  |  |  |  |  | } | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | 1; | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | =head1 NAME | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  | Badger::Apps - factory module for application modules | 
| 27 |  |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | This module implements a subclass of L for loading and | 
| 31 |  |  |  |  |  |  | instantiating L application modules. | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | =head1 METHODS | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | The following methods are defined in addition to those inherited from the | 
| 36 |  |  |  |  |  |  | L and L base classes. | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | =head2 found_module($type, $module, @args) | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | =head2 not_found($type, @args) | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | =head1 AUTHOR | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | Andy Wardley L | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | =head1 COPYRIGHT | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | Copyright (C) 2008-2012 Andy Wardley.  All Rights Reserved. | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | This module is free software; you can redistribute it and/or | 
| 51 |  |  |  |  |  |  | modify it under the same terms as Perl itself. | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  | L, | 
| 56 |  |  |  |  |  |  | L. | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | =cut | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | # Local Variables: | 
| 61 |  |  |  |  |  |  | # mode: perl | 
| 62 |  |  |  |  |  |  | # perl-indent-level: 4 | 
| 63 |  |  |  |  |  |  | # indent-tabs-mode: nil | 
| 64 |  |  |  |  |  |  | # End: | 
| 65 |  |  |  |  |  |  | # | 
| 66 |  |  |  |  |  |  | # vim: expandtab shiftwidth=4: | 
| 67 |  |  |  |  |  |  |  |