File Coverage

blib/lib/Treex/PML/Schema/Root.pm
Criterion Covered Total %
statement 24 29 82.7
branch n/a
condition n/a
subroutine 10 14 71.4
pod 6 6 100.0
total 40 49 81.6


line stmt bran cond sub pod time code
1             package Treex::PML::Schema::Root;
2              
3             package Treex::PML::Schema::Root;
4 9     9   61 use strict;
  9         17  
  9         302  
5 9     9   34 use warnings;
  9         15  
  9         441  
6              
7 9     9   39 use vars qw($VERSION);
  9         11  
  9         472  
8             BEGIN {
9 9     9   187 $VERSION='2.29'; # version template
10             }
11 9     9   39 no warnings 'uninitialized';
  9         30  
  9         352  
12 9     9   38 use Carp;
  9         9  
  9         582  
13 9     9   48 use Treex::PML::Schema::Constants;
  9         11  
  9         808  
14 9     9   44 use base qw( Treex::PML::Schema::Decl );
  9         19  
  9         2005  
15              
16             =head1 NAME
17              
18             Treex::PML::Schema::Root - implements root PML-schema declaration
19              
20             =head1 INHERITANCE
21              
22             This class inherits from L.
23              
24             =head1 METHODS
25              
26             See the super-class for the complete list.
27              
28             =over 3
29              
30             =item $decl->is_root ()
31              
32             Returns 1.
33              
34             =item $decl->get_name ()
35              
36             Returns the declared PML root-element name.
37              
38             =item $decl->get_decl_type ()
39              
40             Returns the constant PML_ROOT_DECL.
41              
42             =item $decl->get_decl_type_str ()
43              
44             Returns the string 'root'.
45              
46             =item $decl->get_content_decl ()
47              
48             Returns declaration of the content type.
49              
50             =cut
51              
52 0     0 1 0 sub is_root { 1 }
53 0     0 1 0 sub is_atomic { undef }
54 192     192 1 409 sub get_decl_type { return PML_ROOT_DECL; }
55 0     0 1 0 sub get_decl_type_str { return 'root'; }
56 116     116 1 343 sub get_name { return $_[0]->{name}; }
57             sub validate_object {
58 0     0 1   my $self = shift;
59 0           $self->get_content_decl->validate_object(@_);
60             }
61              
62             =back
63              
64             =cut
65              
66              
67             1;
68              
69             =head1 SEE ALSO
70              
71             L, L, L.
72              
73             =head1 COPYRIGHT AND LICENSE
74              
75             Copyright (C) 2008-2010 by Petr Pajas, 2010-2024 Jan Stepanek
76              
77             This library is free software; you can redistribute it and/or modify
78             it under the same terms as Perl itself, either Perl version 5.8.2 or,
79             at your option, any later version of Perl 5 you may have available.
80              
81             =head1 BUGS
82              
83             None reported... yet.
84              
85             =cut
86