| 1 | ## Domain Registry Interface, STDERR Logging operations for Net::DRI | ||||||||||
| 2 | ## | ||||||||||
| 3 | ## Copyright (c) 2009 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. | ||||||||||
| 4 | ## | ||||||||||
| 5 | ## This file is part of Net::DRI | ||||||||||
| 6 | ## | ||||||||||
| 7 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||
| 8 | ## it under the terms of the GNU General Public License as published by | ||||||||||
| 9 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 10 | ## (at your option) any later version. | ||||||||||
| 11 | ## | ||||||||||
| 12 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 13 | #################################################################################################### | ||||||||||
| 14 | |||||||||||
| 15 | package Net::DRI::Logging::Stderr; | ||||||||||
| 16 | |||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | 1 | ▶ | use base qw/Net::DRI::Logging/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | 1 | ▶ | use IO::Handle; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | |||||||||||
| 24 | 1 | *STDERR->autoflush(); | |||||||||
| 25 | |||||||||||
| 26 | #################################################################################################### | ||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub name { return 'stderr'; } | ||||||||
|
Subroutine
name: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 29 | 0 | ▶ | sub setup_channel { my ($self,$source,$type,$data)=@_; return; } ## nothing to do really | ||||||||
|
Subroutine
setup_channel: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 30 | |||||||||||
| 31 | sub output | ||||||||||
| 32 | { | ||||||||||
| 33 | 0 | ▶ | my ($self,$level,$type,$data)=@_; | ||||||||
|
Subroutine
output: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 34 | 0 | ▶ | if ($self->should_log($level)) { *STDERR->print($self->tostring($level,$type,$data),"\n"); } | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 0 | return; | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | #################################################################################################### | ||||||||||
| 39 | 1 | 1; | |||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||
| 42 | |||||||||||
| 43 | =pod | ||||||||||
| 44 | |||||||||||
| 45 | =head1 NAME | ||||||||||
| 46 | |||||||||||
| 47 | Net::DRI::Logging::Stderr - STDERR Logging Operations for Net::DRI | ||||||||||
| 48 | |||||||||||
| 49 | =head1 SYNOPSIS | ||||||||||
| 50 | |||||||||||
| 51 | See L<Net::DRI::Logging> | ||||||||||
| 52 | |||||||||||
| 53 | =head1 DESCRIPTION | ||||||||||
| 54 | |||||||||||
| 55 | This class dumps all logging information to STDERR. | ||||||||||
| 56 | |||||||||||
| 57 | =head1 EXAMPLES | ||||||||||
| 58 | |||||||||||
| 59 | $dri->new({..., logging => 'stderr' ,...}); | ||||||||||
| 60 | |||||||||||
| 61 | =head1 SUBROUTINES/METHODS | ||||||||||
| 62 | |||||||||||
| 63 | All mandated by superclass L<Net::DRI::Logging>. | ||||||||||
| 64 | |||||||||||
| 65 | =head1 DIAGNOSTICS | ||||||||||
| 66 | |||||||||||
| 67 | None. | ||||||||||
| 68 | |||||||||||
| 69 | =head1 CONFIGURATION AND ENVIRONMENT | ||||||||||
| 70 | |||||||||||
| 71 | None. | ||||||||||
| 72 | |||||||||||
| 73 | =head1 DEPENDENCIES | ||||||||||
| 74 | |||||||||||
| 75 | This modules has to be used inside the Net::DRI framework and needs the following composants: | ||||||||||
| 76 | |||||||||||
| 77 | =over | ||||||||||
| 78 | |||||||||||
| 79 | =item L<Net::DRI::Logging> | ||||||||||
| 80 | |||||||||||
| 81 | =back | ||||||||||
| 82 | |||||||||||
| 83 | =head1 INCOMPATIBILITIES | ||||||||||
| 84 | |||||||||||
| 85 | None | ||||||||||
| 86 | |||||||||||
| 87 | =head1 BUGS AND LIMITATIONS | ||||||||||
| 88 | |||||||||||
| 89 | No known bugs. Please report problems to author (see below) or use CPAN RT system. Patches are welcome. | ||||||||||
| 90 | |||||||||||
| 91 | =head1 SUPPORT | ||||||||||
| 92 | |||||||||||
| 93 | For now, support questions should be sent to: | ||||||||||
| 94 | |||||||||||
| 95 | E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 96 | |||||||||||
| 97 | Please also see the SUPPORT file in the distribution. | ||||||||||
| 98 | |||||||||||
| 99 | =head1 SEE ALSO | ||||||||||
| 100 | |||||||||||
| 101 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||
| 102 | |||||||||||
| 103 | =head1 AUTHOR | ||||||||||
| 104 | |||||||||||
| 105 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 106 | |||||||||||
| 107 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 108 | |||||||||||
| 109 | Copyright (c) 2009 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. | ||||||||||
| 110 | |||||||||||
| 111 | This program is free software; you can redistribute it and/or modify | ||||||||||
| 112 | it under the terms of the GNU General Public License as published by | ||||||||||
| 113 | the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 114 | (at your option) any later version. | ||||||||||
| 115 | |||||||||||
| 116 | See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 117 | |||||||||||
| 118 | =cut | ||||||||||