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 8     8   86 use strict;
  8         18  
  8         418  
4 8     8   45 use warnings;
  8         16  
  8         463  
5              
6 8     8   48 use vars qw($VERSION);
  8         31  
  8         488  
7             BEGIN {
8 8     8   218 $VERSION='2.28'; # version template
9             }
10 8     8   42 no warnings 'uninitialized';
  8         16  
  8         462  
11 8     8   51 use Carp;
  8         401  
  8         641  
12              
13 8     8   133 use Treex::PML::Schema::Constants;
  8         16  
  8         1071  
14 8     8   52 use base qw( Treex::PML::Schema::Decl );
  8         15  
  8         2482  
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 1434     1434 1 2484 sub get_decl_type { return PML_TYPE_DECL; }
53 0     0 1 0 sub get_decl_type_str { return 'type'; }
54 390     390 1 1389 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__