| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Wikibase::Datatype::Print::Utils; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 36 |  |  | 36 |  | 6509631 | use base qw(Exporter); | 
|  | 36 |  |  |  |  | 226 |  | 
|  | 36 |  |  |  |  | 4319 |  | 
| 4 | 36 |  |  | 36 |  | 259 | use strict; | 
|  | 36 |  |  |  |  | 106 |  | 
|  | 36 |  |  |  |  | 788 |  | 
| 5 | 36 |  |  | 36 |  | 247 | use warnings; | 
|  | 36 |  |  |  |  | 99 |  | 
|  | 36 |  |  |  |  | 1187 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 | 36 |  |  | 36 |  | 1247 | use Error::Pure qw(err); | 
|  | 36 |  |  |  |  | 23399 |  | 
|  | 36 |  |  |  |  | 1409 |  | 
| 8 | 36 |  |  | 36 |  | 342 | use Readonly; | 
|  | 36 |  |  |  |  | 85 |  | 
|  | 36 |  |  |  |  | 30020 |  | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | Readonly::Array our @EXPORT_OK => qw(print_aliases print_common print_descriptions | 
| 11 |  |  |  |  |  |  | print_forms print_glosses print_labels print_references print_senses | 
| 12 |  |  |  |  |  |  | print_sitelinks print_statements); | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | our $VERSION = 0.12; | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | sub print_aliases { | 
| 17 | 4 |  |  | 4 | 1 | 43178 | my ($obj, $opts_hr, $alias_cb) = @_; | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | return print_common($obj, $opts_hr, 'aliases', $alias_cb, | 
| 20 |  |  |  |  |  |  | 'Aliases', sub { | 
| 21 | 23 |  |  | 23 |  | 40 | grep { $_->language eq $opts_hr->{'lang'} } @_ | 
|  | 23 |  |  |  |  | 50 |  | 
| 22 |  |  |  |  |  |  | }, | 
| 23 | 4 |  |  |  |  | 56 | ); | 
| 24 |  |  |  |  |  |  | } | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  | sub print_common { | 
| 27 | 61 |  |  | 61 | 1 | 25787 | my ($obj, $opts_hr, $list_method, $print_cb, $title, $input_cb, | 
| 28 |  |  |  |  |  |  | $flag_one_line) = @_; | 
| 29 |  |  |  |  |  |  |  | 
| 30 | 61 |  |  |  |  | 119 | my @input; | 
| 31 | 61 | 100 |  |  |  | 172 | if (defined $input_cb) { | 
| 32 | 16 |  |  |  |  | 35 | @input = map { $input_cb->($_) } @{$obj->$list_method}; | 
|  | 40 |  |  |  |  | 371 |  | 
|  | 16 |  |  |  |  | 69 |  | 
| 33 |  |  |  |  |  |  | } else { | 
| 34 | 45 |  |  |  |  | 87 | @input = @{$obj->$list_method}; | 
|  | 45 |  |  |  |  | 259 |  | 
| 35 |  |  |  |  |  |  | } | 
| 36 |  |  |  |  |  |  |  | 
| 37 | 61 |  |  |  |  | 689 | my @ret; | 
| 38 |  |  |  |  |  |  | my @values; | 
| 39 | 61 |  |  |  |  | 126 | my $separator = '  '; | 
| 40 | 61 | 100 |  |  |  | 184 | if ($flag_one_line) { | 
| 41 | 10 |  |  |  |  | 26 | $separator = ' '; | 
| 42 |  |  |  |  |  |  | } | 
| 43 | 61 |  |  |  |  | 152 | foreach my $list_item (@input) { | 
| 44 | 63 |  |  |  |  | 221 | push @values, map { $separator.$_ } $print_cb->($list_item, $opts_hr); | 
|  | 103 |  |  |  |  | 736 |  | 
| 45 |  |  |  |  |  |  | } | 
| 46 | 61 | 100 |  |  |  | 190 | if (@values) { | 
| 47 | 43 | 100 |  |  |  | 121 | if ($flag_one_line) { | 
| 48 | 9 | 100 |  |  |  | 51 | if (@values > 1) { | 
| 49 | 1 |  |  |  |  | 12 | err "Multiple values are printed to one line."; | 
| 50 |  |  |  |  |  |  | } | 
| 51 | 8 |  |  |  |  | 32 | push @ret, $title.':'.$values[0]; | 
| 52 |  |  |  |  |  |  | } else { | 
| 53 | 34 |  |  |  |  | 126 | push @ret, ( | 
| 54 |  |  |  |  |  |  | $title.':', | 
| 55 |  |  |  |  |  |  | @values, | 
| 56 |  |  |  |  |  |  | ); | 
| 57 |  |  |  |  |  |  | } | 
| 58 |  |  |  |  |  |  | } | 
| 59 |  |  |  |  |  |  |  | 
| 60 | 60 |  |  |  |  | 281 | return @ret; | 
| 61 |  |  |  |  |  |  | } | 
| 62 |  |  |  |  |  |  |  | 
| 63 |  |  |  |  |  |  | sub print_descriptions { | 
| 64 | 4 |  |  | 4 | 1 | 19123 | my ($obj, $opts_hr, $desc_cb) = @_; | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | return print_common($obj, $opts_hr, 'descriptions', $desc_cb, | 
| 67 |  |  |  |  |  |  | 'Description', sub { | 
| 68 | 5 |  |  | 5 |  | 12 | grep { $_->language eq $opts_hr->{'lang'} } @_ | 
|  | 5 |  |  |  |  | 14 |  | 
| 69 | 4 |  |  |  |  | 57 | }, 1, | 
| 70 |  |  |  |  |  |  | ); | 
| 71 |  |  |  |  |  |  | } | 
| 72 |  |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  | sub print_forms { | 
| 74 | 2 |  |  | 2 | 1 | 13740 | my ($obj, $opts_hr, $form_cb) = @_; | 
| 75 |  |  |  |  |  |  |  | 
| 76 | 2 |  |  |  |  | 17 | return print_common($obj, $opts_hr, 'forms', $form_cb, | 
| 77 |  |  |  |  |  |  | 'Forms'); | 
| 78 |  |  |  |  |  |  | } | 
| 79 |  |  |  |  |  |  |  | 
| 80 |  |  |  |  |  |  | sub print_glosses { | 
| 81 | 4 |  |  | 4 | 1 | 5326 | my ($obj, $opts_hr, $glosse_cb) = @_; | 
| 82 |  |  |  |  |  |  |  | 
| 83 | 4 |  |  |  |  | 39 | return print_common($obj, $opts_hr, 'glosses', $glosse_cb, | 
| 84 |  |  |  |  |  |  | 'Glosses'); | 
| 85 |  |  |  |  |  |  | } | 
| 86 |  |  |  |  |  |  |  | 
| 87 |  |  |  |  |  |  | sub print_labels { | 
| 88 | 4 |  |  | 4 | 1 | 22304 | my ($obj, $opts_hr, $label_cb) = @_; | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | return print_common($obj, $opts_hr, 'labels', $label_cb, | 
| 91 |  |  |  |  |  |  | 'Label', sub { | 
| 92 | 6 |  |  | 6 |  | 23 | grep { $_->language eq $opts_hr->{'lang'} } @_ | 
|  | 6 |  |  |  |  | 20 |  | 
| 93 | 4 |  |  |  |  | 64 | }, 1, | 
| 94 |  |  |  |  |  |  | ); | 
| 95 |  |  |  |  |  |  | } | 
| 96 |  |  |  |  |  |  |  | 
| 97 |  |  |  |  |  |  | sub print_references { | 
| 98 | 20 |  |  | 20 | 1 | 4923 | my ($obj, $opts_hr, $reference_cb) = @_; | 
| 99 |  |  |  |  |  |  |  | 
| 100 | 20 |  |  |  |  | 119 | return print_common($obj, $opts_hr, 'references', $reference_cb, | 
| 101 |  |  |  |  |  |  | 'References'); | 
| 102 |  |  |  |  |  |  | } | 
| 103 |  |  |  |  |  |  |  | 
| 104 |  |  |  |  |  |  | sub print_senses { | 
| 105 | 2 |  |  | 2 | 1 | 14763 | my ($obj, $opts_hr, $sense_cb) = @_; | 
| 106 |  |  |  |  |  |  |  | 
| 107 | 2 |  |  |  |  | 10 | return print_common($obj, $opts_hr, 'senses', $sense_cb, | 
| 108 |  |  |  |  |  |  | 'Senses'); | 
| 109 |  |  |  |  |  |  | } | 
| 110 |  |  |  |  |  |  |  | 
| 111 |  |  |  |  |  |  | sub print_sitelinks { | 
| 112 | 2 |  |  | 2 | 1 | 20080 | my ($obj, $opts_hr, $sitelink_cb) = @_; | 
| 113 |  |  |  |  |  |  |  | 
| 114 | 2 |  |  |  |  | 7 | return print_common($obj, $opts_hr, 'sitelinks', $sitelink_cb, | 
| 115 |  |  |  |  |  |  | 'Sitelinks'); | 
| 116 |  |  |  |  |  |  | } | 
| 117 |  |  |  |  |  |  |  | 
| 118 |  |  |  |  |  |  | sub print_statements { | 
| 119 | 12 |  |  | 12 | 1 | 2969 | my ($obj, $opts_hr, $statement_cb) = @_; | 
| 120 |  |  |  |  |  |  |  | 
| 121 | 12 |  |  |  |  | 45 | return print_common($obj, $opts_hr, 'statements', $statement_cb, | 
| 122 |  |  |  |  |  |  | 'Statements'); | 
| 123 |  |  |  |  |  |  | } | 
| 124 |  |  |  |  |  |  |  | 
| 125 |  |  |  |  |  |  | 1; | 
| 126 |  |  |  |  |  |  |  | 
| 127 |  |  |  |  |  |  | __END__ | 
| 128 |  |  |  |  |  |  |  | 
| 129 |  |  |  |  |  |  | =pod | 
| 130 |  |  |  |  |  |  |  | 
| 131 |  |  |  |  |  |  | =encoding utf8 | 
| 132 |  |  |  |  |  |  |  | 
| 133 |  |  |  |  |  |  | =head1 NAME | 
| 134 |  |  |  |  |  |  |  | 
| 135 |  |  |  |  |  |  | Wikibase::Datatype::Print::Utils - Wikibase pretty print helper utils. | 
| 136 |  |  |  |  |  |  |  | 
| 137 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 138 |  |  |  |  |  |  |  | 
| 139 |  |  |  |  |  |  | use Wikibase::Datatype::Print::Utils qw(print_aliases print_common print_descriptions | 
| 140 |  |  |  |  |  |  | print_forms print_glosses print_labels print_references print_senses | 
| 141 |  |  |  |  |  |  | print_sitelinks print_statements); | 
| 142 |  |  |  |  |  |  |  | 
| 143 |  |  |  |  |  |  | my @aliase_strings = print_aliases($obj, $opts_hr, $alias_cb); | 
| 144 |  |  |  |  |  |  | my @common_strings = print_common($obj, $opts_hr, $list_method, $print_cb, $title, $input_cb, $flag_one_line); | 
| 145 |  |  |  |  |  |  | my @desc_strings = print_descriptions($obj, $opts_hr, $desc_cb); | 
| 146 |  |  |  |  |  |  | my @form_strings = print_forms($obj, $opts_hr, $form_cb); | 
| 147 |  |  |  |  |  |  | my @glosse_strings = print_glosses($obj, $opts_hr, $glosse_cb); | 
| 148 |  |  |  |  |  |  | my @label_strings = print_labels($obj, $opts_hr, $label_cb); | 
| 149 |  |  |  |  |  |  | my @reference_strings = print_references($obj, $opts_hr, $reference_cb); | 
| 150 |  |  |  |  |  |  | my @sense_strings = print_senses($obj, $opts_hr, $sense_cb); | 
| 151 |  |  |  |  |  |  | my @sitelink_strings = print_sitelinks($obj, $opts_hr, $sitelink_cb); | 
| 152 |  |  |  |  |  |  | my @statement_strings = print_statements($obj, $opts_hr, $statement_cb); | 
| 153 |  |  |  |  |  |  |  | 
| 154 |  |  |  |  |  |  | =head1 SUBROUTINES | 
| 155 |  |  |  |  |  |  |  | 
| 156 |  |  |  |  |  |  | =head2 C<print_aliases> | 
| 157 |  |  |  |  |  |  |  | 
| 158 |  |  |  |  |  |  | my @aliase_strings = print_aliases($obj, $opts_hr, $alias_cb); | 
| 159 |  |  |  |  |  |  |  | 
| 160 |  |  |  |  |  |  | Get aliase strings from data object. | 
| 161 |  |  |  |  |  |  |  | 
| 162 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 163 |  |  |  |  |  |  |  | 
| 164 |  |  |  |  |  |  | =head2 C<print_common> | 
| 165 |  |  |  |  |  |  |  | 
| 166 |  |  |  |  |  |  | my @common_strings = print_common($obj, $opts_hr, $list_method, $print_cb, $title, $input_cb, $flag_one_line); | 
| 167 |  |  |  |  |  |  |  | 
| 168 |  |  |  |  |  |  | Common function for get pretty print strings from object. | 
| 169 |  |  |  |  |  |  |  | 
| 170 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 171 |  |  |  |  |  |  |  | 
| 172 |  |  |  |  |  |  | =head2 C<print_descriptions> | 
| 173 |  |  |  |  |  |  |  | 
| 174 |  |  |  |  |  |  | my @desc_strings = print_descriptions($obj, $opts_hr, $desc_cb); | 
| 175 |  |  |  |  |  |  |  | 
| 176 |  |  |  |  |  |  | Get description strings from data object. | 
| 177 |  |  |  |  |  |  |  | 
| 178 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 179 |  |  |  |  |  |  |  | 
| 180 |  |  |  |  |  |  | =head2 C<print_forms> | 
| 181 |  |  |  |  |  |  |  | 
| 182 |  |  |  |  |  |  | my @form_strings = print_forms($obj, $opts_hr, $form_cb); | 
| 183 |  |  |  |  |  |  |  | 
| 184 |  |  |  |  |  |  | Get form strings from data object. | 
| 185 |  |  |  |  |  |  |  | 
| 186 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 187 |  |  |  |  |  |  |  | 
| 188 |  |  |  |  |  |  | =head2 C<print_glosses> | 
| 189 |  |  |  |  |  |  |  | 
| 190 |  |  |  |  |  |  | my @glosse_strings = print_glosses($obj, $opts_hr, $glosse_cb); | 
| 191 |  |  |  |  |  |  |  | 
| 192 |  |  |  |  |  |  | Get glosse strings from data object. | 
| 193 |  |  |  |  |  |  |  | 
| 194 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 195 |  |  |  |  |  |  |  | 
| 196 |  |  |  |  |  |  | =head2 C<print_labels> | 
| 197 |  |  |  |  |  |  |  | 
| 198 |  |  |  |  |  |  | my @label_strings = print_labels($obj, $opts_hr, $label_cb); | 
| 199 |  |  |  |  |  |  |  | 
| 200 |  |  |  |  |  |  | Get label strings from data object. | 
| 201 |  |  |  |  |  |  |  | 
| 202 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 203 |  |  |  |  |  |  |  | 
| 204 |  |  |  |  |  |  | =head2 C<print_references> | 
| 205 |  |  |  |  |  |  |  | 
| 206 |  |  |  |  |  |  | my @reference_strings = print_references($obj, $opts_hr, $reference_cb); | 
| 207 |  |  |  |  |  |  |  | 
| 208 |  |  |  |  |  |  | Get reference strings from data object. | 
| 209 |  |  |  |  |  |  |  | 
| 210 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 211 |  |  |  |  |  |  |  | 
| 212 |  |  |  |  |  |  | =head2 C<print_senses> | 
| 213 |  |  |  |  |  |  |  | 
| 214 |  |  |  |  |  |  | my @sense_strings = print_senses($obj, $opts_hr, $sense_cb); | 
| 215 |  |  |  |  |  |  |  | 
| 216 |  |  |  |  |  |  | Get sense strings from data object. | 
| 217 |  |  |  |  |  |  |  | 
| 218 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 219 |  |  |  |  |  |  |  | 
| 220 |  |  |  |  |  |  | =head2 C<print_sitelinks> | 
| 221 |  |  |  |  |  |  |  | 
| 222 |  |  |  |  |  |  | my @sitelink_strings = print_sitelinks($obj, $opts_hr, $sitelink_cb); | 
| 223 |  |  |  |  |  |  |  | 
| 224 |  |  |  |  |  |  | Get sitelink strings from data object. | 
| 225 |  |  |  |  |  |  |  | 
| 226 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 227 |  |  |  |  |  |  |  | 
| 228 |  |  |  |  |  |  | =head2 C<print_statements> | 
| 229 |  |  |  |  |  |  |  | 
| 230 |  |  |  |  |  |  | my @statement_strings = print_statements($obj, $opts_hr, $statement_cb); | 
| 231 |  |  |  |  |  |  |  | 
| 232 |  |  |  |  |  |  | Get statement strings from data object. | 
| 233 |  |  |  |  |  |  |  | 
| 234 |  |  |  |  |  |  | Returns array with pretty print strings. | 
| 235 |  |  |  |  |  |  |  | 
| 236 |  |  |  |  |  |  | =head1 ERRORS | 
| 237 |  |  |  |  |  |  |  | 
| 238 |  |  |  |  |  |  | print_common(): | 
| 239 |  |  |  |  |  |  | Multiple values are printed to one line. | 
| 240 |  |  |  |  |  |  |  | 
| 241 |  |  |  |  |  |  | print_descriptions(): | 
| 242 |  |  |  |  |  |  | From print_common(): | 
| 243 |  |  |  |  |  |  | Multiple values are printed to one line. | 
| 244 |  |  |  |  |  |  |  | 
| 245 |  |  |  |  |  |  | print_labels(): | 
| 246 |  |  |  |  |  |  | From print_common(): | 
| 247 |  |  |  |  |  |  | Multiple values are printed to one line. | 
| 248 |  |  |  |  |  |  |  | 
| 249 |  |  |  |  |  |  | =head1 EXAMPLE1 | 
| 250 |  |  |  |  |  |  |  | 
| 251 |  |  |  |  |  |  | =for comment filename=utils_print_aliases.pl | 
| 252 |  |  |  |  |  |  |  | 
| 253 |  |  |  |  |  |  | use strict; | 
| 254 |  |  |  |  |  |  | use warnings; | 
| 255 |  |  |  |  |  |  |  | 
| 256 |  |  |  |  |  |  | use Unicode::UTF8 qw(encode_utf8); | 
| 257 |  |  |  |  |  |  | use Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::Dog; | 
| 258 |  |  |  |  |  |  | use Wikibase::Datatype::Print::Utils qw(print_aliases); | 
| 259 |  |  |  |  |  |  | use Wikibase::Datatype::Print::Value::Monolingual; | 
| 260 |  |  |  |  |  |  |  | 
| 261 |  |  |  |  |  |  | my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::Dog->new; | 
| 262 |  |  |  |  |  |  | my @ret = print_aliases($obj, {'lang' => 'cs'}, | 
| 263 |  |  |  |  |  |  | \&Wikibase::Datatype::Print::Value::Monolingual::print); | 
| 264 |  |  |  |  |  |  |  | 
| 265 |  |  |  |  |  |  | # Print. | 
| 266 |  |  |  |  |  |  | print encode_utf8(join "\n", @ret); | 
| 267 |  |  |  |  |  |  | print "\n"; | 
| 268 |  |  |  |  |  |  |  | 
| 269 |  |  |  |  |  |  | # Output: | 
| 270 |  |  |  |  |  |  | # Aliases: | 
| 271 |  |  |  |  |  |  | #   pes domácí (cs) | 
| 272 |  |  |  |  |  |  |  | 
| 273 |  |  |  |  |  |  | =head1 EXAMPLE2 | 
| 274 |  |  |  |  |  |  |  | 
| 275 |  |  |  |  |  |  | =for comment filename=utils_print_descriptions.pl | 
| 276 |  |  |  |  |  |  |  | 
| 277 |  |  |  |  |  |  | use strict; | 
| 278 |  |  |  |  |  |  | use warnings; | 
| 279 |  |  |  |  |  |  |  | 
| 280 |  |  |  |  |  |  | use Unicode::UTF8 qw(encode_utf8); | 
| 281 |  |  |  |  |  |  | use Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::Dog; | 
| 282 |  |  |  |  |  |  | use Wikibase::Datatype::Print::Utils qw(print_descriptions); | 
| 283 |  |  |  |  |  |  | use Wikibase::Datatype::Print::Value::Monolingual; | 
| 284 |  |  |  |  |  |  |  | 
| 285 |  |  |  |  |  |  | my $obj = Test::Shared::Fixture::Wikibase::Datatype::Item::Wikidata::Dog->new; | 
| 286 |  |  |  |  |  |  | my @ret = print_descriptions($obj, {'lang' => 'cs'}, | 
| 287 |  |  |  |  |  |  | \&Wikibase::Datatype::Print::Value::Monolingual::print); | 
| 288 |  |  |  |  |  |  |  | 
| 289 |  |  |  |  |  |  | # Print. | 
| 290 |  |  |  |  |  |  | print encode_utf8(join "\n", @ret); | 
| 291 |  |  |  |  |  |  | print "\n"; | 
| 292 |  |  |  |  |  |  |  | 
| 293 |  |  |  |  |  |  | # Output: | 
| 294 |  |  |  |  |  |  | # Description: domácí zvíře (cs) | 
| 295 |  |  |  |  |  |  |  | 
| 296 |  |  |  |  |  |  | =head1 DEPENDENCIES | 
| 297 |  |  |  |  |  |  |  | 
| 298 |  |  |  |  |  |  | L<Error::Pure>, | 
| 299 |  |  |  |  |  |  | L<Exporter>, | 
| 300 |  |  |  |  |  |  | L<Readonly>. | 
| 301 |  |  |  |  |  |  |  | 
| 302 |  |  |  |  |  |  | =head1 REPOSITORY | 
| 303 |  |  |  |  |  |  |  | 
| 304 |  |  |  |  |  |  | L<https://github.com/michal-josef-spacek/Wikibase-Datatype-Print> | 
| 305 |  |  |  |  |  |  |  | 
| 306 |  |  |  |  |  |  | =head1 AUTHOR | 
| 307 |  |  |  |  |  |  |  | 
| 308 |  |  |  |  |  |  | Michal Josef Špaček L<mailto:skim@cpan.org> | 
| 309 |  |  |  |  |  |  |  | 
| 310 |  |  |  |  |  |  | L<http://skim.cz> | 
| 311 |  |  |  |  |  |  |  | 
| 312 |  |  |  |  |  |  | =head1 LICENSE AND COPYRIGHT | 
| 313 |  |  |  |  |  |  |  | 
| 314 |  |  |  |  |  |  | © 2020-2023 Michal Josef Špaček | 
| 315 |  |  |  |  |  |  |  | 
| 316 |  |  |  |  |  |  | BSD 2-Clause License | 
| 317 |  |  |  |  |  |  |  | 
| 318 |  |  |  |  |  |  | =head1 VERSION | 
| 319 |  |  |  |  |  |  |  | 
| 320 |  |  |  |  |  |  | 0.12 | 
| 321 |  |  |  |  |  |  |  | 
| 322 |  |  |  |  |  |  | =cut |