File Coverage

blib/lib/Treex/PML/Schema/Type.pm
Criterion Covered Total %
statement 24 28 85.7
branch n/a
condition n/a
subroutine 10 13 76.9
pod 5 5 100.0
total 39 46 84.7


line stmt bran cond sub pod time code
1             package Treex::PML::Schema::Type;
2              
3 9     9   52 use strict;
  9         12  
  9         356  
4 9     9   36 use warnings;
  9         24  
  9         397  
5              
6 9     9   39 use vars qw($VERSION);
  9         24  
  9         461  
7             BEGIN {
8 9     9   197 $VERSION='2.29'; # version template
9             }
10 9     9   37 no warnings 'uninitialized';
  9         16  
  9         377  
11 9     9   70 use Carp;
  9         187  
  9         797  
12              
13 9     9   51 use Treex::PML::Schema::Constants;
  9         241  
  9         779  
14 9     9   42 use base qw( Treex::PML::Schema::Decl );
  9         12  
  9         1963  
15              
16              
17             =head1 NAME
18              
19             Treex::PML::Schema::Type - implements named type declaration in a PML schema
20              
21             =head1 INHERITANCE
22              
23             This class inherits from L.
24              
25             =head1 METHODS
26              
27             See the super-class for the complete list.
28              
29             =over 3
30              
31             =item $decl->get_name ()
32              
33             Returns type name.
34              
35             =item $decl->get_decl_type ()
36              
37             Returns the constant PML_TYPE_DECL.
38              
39             =item $decl->get_decl_type_str ()
40              
41             Returns the string 'type'.
42              
43             =item $decl->get_content_decl ()
44              
45             Returns the associated data-type declaration.
46              
47             =back
48              
49             =cut
50              
51 0     0 1 0 sub is_atomic { undef }
52 1474     1474 1 2007 sub get_decl_type { return PML_TYPE_DECL; }
53 0     0 1 0 sub get_decl_type_str { return 'type'; }
54 400     400 1 1046 sub get_name { return $_[0]->{-name}; }
55             sub validate_object {
56 0     0 1   my $self = shift;
57 0           $self->get_content_decl->validate_object(@_);
58             }
59              
60              
61             1;
62             __END__