File: Apps.pm

package info (click to toggle)
libbadger-perl 0.16-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,400 kB
  • sloc: perl: 11,004; makefile: 9
file content (67 lines) | stat: -rw-r--r-- 1,309 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package Badger::Apps;

use Badger::Factory::Class
    version   => 0.01,
    debug     => 0,
    item      => 'app';


sub found_module {
    my ($self, $type, $module, $args) = @_;
    $self->debug("Found module: $type => $module") if DEBUG;
    $self->{ loaded }->{ $module } ||= class($module)->load;
    return $module;
}

sub not_found {
    my ($self, $type, @args) = @_;
    return $self->decline_msg( not_found => $self->{ item }, $type );
}


1;

=head1 NAME

Badger::Apps - factory module for application modules

=head1 DESCRIPTION

This module implements a subclass of L<Badger::Factory> for loading and
instantiating L<Badger::App> application modules.

=head1 METHODS

The following methods are defined in addition to those inherited from the 
L<Badger::Factory> and L<Badger::Base> base classes.

=head2 found_module($type, $module, @args)

=head2 not_found($type, @args)

=head1 AUTHOR

Andy Wardley L<http://wardley.org/>

=head1 COPYRIGHT

Copyright (C) 2008-2012 Andy Wardley.  All Rights Reserved.

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

=head1 SEE ALSO

L<Badger::Factory>,
L<Badger::Base>.

=cut

# Local Variables:
# mode: perl
# perl-indent-level: 4
# indent-tabs-mode: nil
# End:
#
# vim: expandtab shiftwidth=4: