root/lang/perl/DB-Pluggable/trunk/lib/DB/Pluggable/Constants.pm @ 16454

Revision 16454, 2.1 kB (checked in by hanekomu, 5 years ago)

continued to update distribution to standard style

Line 
1package DB::Pluggable::Constants;
2
3use strict;
4use warnings;
5
6
7our $VERSION = '0.03';
8
9
10use base 'Exporter';
11
12
13our %EXPORT_TAGS = (
14    util  => [ qw(HANDLED DECLINED) ],
15);
16
17
18our @EXPORT_OK = @{ $EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ] };
19
20
21use constant HANDLED  => '200';
22use constant DECLINED => '500';
23
24
251;
26
27
28__END__
29
30
31
32=head1 NAME
33
34DB::Pluggable::Constants - Constants for debugger plugin hook methods
35
36=head1 SYNOPSIS
37
38    package DB::Pluggable::MyUsefulCommand;
39
40    use DB::Pluggable::Constants ':all';
41
42    sub do_it {
43        my ($self, $context, $args) = @_;
44        ...
45        if (...) {
46            ...
47            return HANDLED;
48        } else {
49            return DECLINED;
50        }
51    }
52
53=head1 DESCRIPTION
54
55This module defines constants that should be used by hooks as return values.
56The following constants are defined:
57
58=over 4
59
60=item HANDLED
61
62This constant should be returned by a command-related hook method to indicate
63that it has handled the debugger command.
64
65=item DECLINED
66
67This constant should be returned by a command-related hook method to indicate
68that it has not handled the debugger command.
69
70=back
71
72L<DB::Pluggable>'s plugin-enabled replacements for the debugger commands use
73these constants to determine whether a command has been handled by one of the
74plugins or whether it should be passed on to the default command handler
75defined in C<perl5db.pl>.
76
77=head1 BUGS AND LIMITATIONS
78
79No bugs have been reported.
80
81Please report any bugs or feature requests through the web interface at
82L<http://rt.cpan.org>.
83
84=head1 INSTALLATION
85
86See perlmodinstall for information and options on installing Perl modules.
87
88=head1 AVAILABILITY
89
90The latest version of this module is available from the Comprehensive Perl
91Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN
92site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>.
93
94=head1 AUTHORS
95
96Marcel GrE<uuml>nauer, C<< <marcel@cpan.org> >>
97
98=head1 COPYRIGHT AND LICENSE
99
100Copyright 2008 by the authors.
101
102This library is free software; you can redistribute it and/or modify
103it under the same terms as Perl itself.
104
105
106=cut
107
Note: See TracBrowser for help on using the browser.