Q4MLog/Logger.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
BUILD
2.0
log
2.0
BEGIN
2.0
CRAP 2.0
1 # $Id: /mirror/coderepos/lang/perl/MooseX-Q4MLog/trunk/lib/MooseX/Q4MLog/Logger.pm 66297 2008-07-16T13:33:55.974156Z daisuke $
2  
3 package MooseX::Q4MLog::Logger;
4 use Moose;
5 use Queue::Q4M;
6  
7 has 'table' => (
8 is => 'rw',
9 isa => 'Str',
10 required => 1,
11 default => 'q_log'
12 );
13  
14 has 'connect_info' => (
15 is => 'rw',
16 isa => 'ArrayRef',
17 required => 1,
18 auto_deref => 1,
19 );
20  
21 has 'q4m' => (
22 is => 'rw',
23 isa => 'Queue::Q4M'
24 );
25  
26 __PACKAGE__->meta->make_immutable;
27  
28 no Moose;
29  
30 sub BUILD {
31 my $self = shift;
32 $self->q4m( Queue::Q4M->new( connect_info => [ $self->connect_info ] ) );
33 }
34  
35 sub log {
36 my ($self, %args) = @_;
37 $self->q4m->insert( $self->table, $args{q4m_args} );
38 }
39  
40 1;
41  
42 __END__