blib/lib/WebDAO/Lexer/regclass.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 34 CC 3 SCAR 19.5
CC
3
Cov
0%
value
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 7.0
1 package WebDAO::Lexer::regclass;
2 =head1 NAME
3  
4 WebDAO::Lexer::regclass - Process regclass tag
5  
6 =head1 SYNOPSIS
7  
8 =head1 DESCRIPTION
9  
10 WebDAO::Lexer::regclass - Process regclass tag
11  
12 =cut
13  
14 our $VERSION = '0.01';
15 use strict;
16 use warnings;
17 use base 'WebDAO::Lexer::base';
18  
19 sub value {
20 my $self = shift;
21 my $eng = shift;
22 my $par = $self->attr;
23 my ( $class, $alias ) = @$par{qw/class alias/};
24 unless ( $class && $alias ) {
25  
26 #_log1 $self
27 warn "Syntax error: regclass - not initialized class or alias";
28 return;
29 }
30 if ( my $error_str = $eng->register_class( $class => $alias ) ) {
31  
32 #_log1 $self
33 warn $error_str;
34 }
35  
36 # warn "regcalss";
37 # return "1";
38 return undef;
39 }
40  
41 1;
42 __DATA__
43  
44 =head1 SEE ALSO
45  
46 http://sourceforge.net/projects/webdao
47  
48 =head1 AUTHOR
49  
50 Zahatski Aliaksandr, E<lt>zag@cpan.orgE<gt>
51  
52 =head1 COPYRIGHT AND LICENSE
53  
54 Copyright 2002-2011 by Zahatski Aliaksandr
55  
56 This library is free software; you can redistribute it and/or modify
57 it under the same terms as Perl itself.
58  
59 =cut
60