blib/lib/Docbook/Convert/Common.pm untested

filter: Statementstmt 0.0% 0 / 396 Branchbran 0.0% 0 / 46 Conditioncond 0.0% 0 / 26 MC/DCmcdc 0.0% 0 / 16 Subroutinesub 0.0% 0 / 61 Podpod 0.0% 0 / 52 totaltotal 0.0% 0 / 597 CC 24 SCAR 22.6
CC
24
Cov
0%
article
56.0
arg
20.0
link
20.0
CRAP 9.6
1 #
2 # This file is part of Docbook::Convert.
3 #
4 # This software is copyright (c) 2026 by Andrew Speer <andrew.speer@isolutions.com.au>.
5 #
6 # This is free software; you can redistribute it and/or modify it under
7 # the same terms as the Perl 5 programming language system itself.
8 #
9 # Full license text is available at:
10 #
11 # <http://dev.perl.org/licenses/>
12 #
13  
14  
15 #
16 #
17 package Docbook::Convert::Common;
18  
19  
20 # Pragma
21 #
22 use strict qw(vars);
23 use vars qw($VERSION);
24 use warnings;
25 no warnings qw(uninitialized);
26  
27  
28 # External modules
29 #
30 use Docbook::Convert::Constant;
31 use Docbook::Convert::Util;
32 use Data::Dumper;
33  
34  
35 # Inherit Base functions (find_node etc.)
36 #
37 use base Docbook::Convert::Base;
38  
39  
40 # Version information in a format suitable for CPAN etc. Must be
41 # all on one line
42 #
43 $VERSION='1.012';
44  
45  
46 # Make synonyms
47 #
48 &Docbook::Convert::Base::create_tag_synonym($ALL_TAG_SYNONYM_HR);
49  
50  
51 #===================================================================================================
52  
53  
54 sub _data {
55 my ($self, $data_ar)=@_;
56 return $data_ar;
57 }
58  
59  
60 sub _image_build {
61  
62 # Build image output
63 #
64 my ($self, $data_ar)=@_;
65  
66  
67 # Get alt text, title, URL etc/
68 my $alt_text1=$self->pull_node_tag_text($data_ar, 'alt', $NULL);
69 my $title=$self->pull_node_tag_text($data_ar, 'title|caption|screeninfo', $NULL);
70 my $image_data_ar=$self->find_node($data_ar, 'imagedata');
71 my $image_data_attr_hr=$image_data_ar->[0][$ATTR_IX];
72 my $alt_text2=$image_data_attr_hr->{'annotations'};
73 my $alt_text=$alt_text1 || $alt_text2;
74 my $url=$image_data_attr_hr->{'fileref'};
75  
76  
77 # Generation Options
78 #
79 my ($no_html, $no_image_fetch)=@{$self}{qw(no_html no_image_fetch)};
80  
81  
82 # Fetch image to calc width etc. if needed
83 #
84 if ((my $scale=$image_data_attr_hr->{'scale'}) && !$no_html && !$no_image_fetch) {
85  
86 # Get Image width
87 #
88 my $width=$self->image_getwidth($url);
89 $width *= ($scale/100);
90 $image_data_attr_hr->{'width'}=$width;
91 }
92  
93 # Return output
94 #
95 return $self->_image($url, $alt_text, $title, $image_data_attr_hr);
96 }
97  
98  
99 sub _meta {
100 my ($self, $data_ar)=@_;
101 my $text=$self->pull_node_text($data_ar, $SP);
102 my $key=$data_ar->[$NODE_IX];
103 $self->{'_meta'}{$key}=$text;
104 return undef;
105 }
106  
107  
108 sub appendix {
109  
110 my ($self, $data_ar)=@_;
111 delete @{$self}{qw(_sect1 _sect2 _sect3 _sect4)};
112 my $app_ix=$self->{'_appendix_count'}++;
113 my @label;
114 my $cr=sub {
115 my ($cr, $num)=@_;
116 my $int;
117 if ($int=int($num/26)) {
118 $cr->($cr, ($int-1));
119 }
120 push @label, chr(($num % 26)+65);
121 };
122 $cr->($cr, $app_ix);
123 my $label=join(undef, @label);
124 my ($title, $subtitle)=
125 $self->pull_node_tag_text($data_ar, 'title|subtitle', $NULL);
126 my $text=$self->pull_node_text($data_ar, $CR2);
127 my $appendix=$self->_h1("Appendix $label: $title");
128 return join($CR2, $appendix, $text);
129  
130 }
131  
132  
133 sub arg {
134  
135 my ($self, $data_ar)=@_;
136  
137 #my $text=$self->pull_node_text($data_ar, $SP);
138 my $text=$self->pull_node_text($data_ar, $NULL);
139 my $attr_hr=$data_ar->[$ATTR_IX] && $data_ar->[$ATTR_IX];
140 if ((my $choice=$attr_hr->{'choice'}) eq 'req') {
141 $text="{$text}";
142 }
143 elsif ($choice eq 'plain') {
144  
145 # Do nothing
146 #
147 }
148 else {
149 # Choice is default - "opt"
150 $text="[$text]";
151 }
152 if ($attr_hr->{'rep'} eq 'repeat') {
153 $text.='...';
154 }
155 return $self->_code($text);
156 }
157  
158  
159 sub article {
160  
161 my ($self, $data_ar)=@_;
162  
163 # Rendering an article. Get article body
164 #
165 my @text=@{$self->pull_node_text($data_ar)};
166  
167  
168 # Title
169 #
170 my $meta_title=$self->find_node_tag_text($data_ar, 'title', $NULL);
171 $self->{'_meta'}{'title'}=$meta_title;
172  
173  
174 # Any prefix/suffix to be appended (e.g. =pod, =cut for POD);
175 my ($prefix, $suffix)=map {$self->$_()} qw(_prefix _suffix);
176  
177  
178 # Shortcut any relevent params we will need
179 #
180 my (
181 $meta_display_top, $meta_display_bottom, $meta_display_title,
182 $meta_display_title_h_style
183 )
184 =@{$self}{qw(
185 meta_display_top
186 meta_display_bottom
187 meta_display_title
188 meta_display_title_h_style
189 )};
190  
191  
192 # Do we want to display meta data - if so format and spit out
193 #
194 if ($meta_display_top || $meta_display_bottom) {
195  
196  
197 # Generate title if requested
198 #
199 if ($meta_display_title) {
200 if (my $h_style="_${meta_display_title_h_style}") {
201 $meta_display_title=$self->$h_style($meta_display_title);
202 }
203 }
204  
205 # Gather key: value meta data tags
206 #
207 my @meta;
208 foreach my $key ('title', @{$ALL_TAG_SYNONYM_HR->{'_meta'}}) {
209 if (my $value=$self->{'_meta'}{$key}) {
210 my $meta_key=ucfirst($key);
211 push @meta, "$meta_key: $value";
212 }
213 }
214 my $meta=join($CR, @meta);
215  
216  
217 # Output at top or bottom as required
218 #
219 if ($meta_display_top) {
220 return $self->_text_cleanup(
221 join($CR2, grep {$_} $prefix, $meta_display_title, $meta, @text, $suffix));
222 }
223 if ($meta_display_bottom) {
224 return $self->_text_cleanup(
225 join($CR2, grep {$_} $prefix, @text, $meta_display_title, $meta, $suffix));
226 }
227  
228 }
229 else {
230 return $self->_text_cleanup(
231 join($CR2, grep {$_} $prefix, @text, $suffix));
232 }
233 }
234  
235  
236 sub blockquote {
237 my ($self, $data_ar)=@_;
238 my @text=@{$self->pull_node_text($data_ar)};
239 my $text;
240 foreach my $line (@text) {
241 my @line=($line=~/^(.*)$/gm);
242 foreach my $line (@line) {
243 chomp($line);
244 $text.="> ${line}${CR}";
245 }
246 $text.=">${CR}";
247 }
248 return $text;
249 }
250  
251  
252 sub citetitle {
253 my ($self, $data_ar)=@_;
254 my $text=$self->pull_node_text($data_ar, $NULL);
255 return $self->_italic($text);
256 }
257  
258  
259 sub cmdsynopsis {
260 my ($self, $data_ar)=@_;
261 my $text=$self->pull_node_text($data_ar, $SP);
262 return $self->_code($text);
263 }
264  
265  
266 sub command {
267 my ($self, $data_ar)=@_;
268 if ($self->find_parent($data_ar, 'screen|programlisting')) {
269  
270 # render later
271 return $data_ar;
272 }
273 else {
274 my $text=$self->pull_node_text($data_ar, $NULL);
275 return $self->_code($text);
276 }
277 }
278  
279  
280 sub code {
281 my ($self, $data_ar)=@_;
282 my $text=$self->pull_node_text($data_ar, $NULL);
283 return $self->_code($text);
284 }
285  
286  
287 sub email {
288 my ($self, $data_ar)=@_;
289 my $email=$self->pull_node_text($data_ar, $NULL);
290 return $self->_email($email);
291 }
292  
293  
294 sub _null {
295 my ($self, $data_ar)=@_;
296 return undef;
297 }
298  
299  
300 sub _sect {
301 my ($self, $data_ar, $count, $h_level)=@_;
302 my ($md_section_num)=$self->{'md_section_num'};
303  
304 my ($title, $subtitle)=
305 $self->pull_node_tag_text($data_ar, 'title|subtitle', $NULL);
306 debug("title: $title, subtitle: $subtitle");
307 my $text=$self->pull_node_text($data_ar, $CR2);
308 debug("text $text");
309 my $tag=$data_ar->[$NODE_IX];
310 $h_level ||= 1;
311  
312 #my ($h_level)=($tag=~/(\d+)$/) || 1;
313 $h_level="_h${h_level}";
314  
315 #return join($CR2, grep {$_} $self->$h_level("$count $title"), $text);
316 if ($md_section_num) {
317 return join($CR2, grep {$_} $self->$h_level("${count}. $title"), $text);
318 }
319 else {
320 return join($CR2, grep {$_} $self->$h_level($title), $text);
321 }
322 }
323  
324  
325 sub emphasis {
326 my ($self, $data_ar)=@_;
327 my $text=$self->pull_node_text($data_ar, $NULL);
328 my $attr_hr=$data_ar->[$ATTR_IX];
329 my $role=$attr_hr->{'role'};
330 if (($role eq 'bold') || ($role eq 'strong')) {
331 return $self->_bold($text);
332 }
333 elsif ($role eq 'strikethrough') {
334 return $self->_strikethrough($text);
335 }
336 else {
337 return $self->_italic($text);
338 }
339 }
340  
341  
342 sub figure {
343 my ($self, $data_ar)=@_;
344 return $self->_image_build($data_ar);
345 }
346  
347  
348 sub group {
349  
350 my ($self, $data_ar)=@_;
351 my ($text_ar)=$self->pull_node_text($data_ar);
352 my $text=join(' | ', @{$text_ar});
353 $text="[ $text ]" if (@{$text_ar} > 1);
354 return $text;
355  
356 }
357  
358  
359 sub itemizedlist {
360 my ($self, $data_ar)=@_;
361 my @list;
362 foreach my $text (@{$self->pull_node_text($data_ar)}) {
363 push @list, $self->_list_item("* $text");
364 }
365  
366 #return join($CR2, grep {$_} $self->_list_begin(), @list, $self->_list_end);
367 return join($CR2, $self->_list_begin(), @list, $self->_list_end);
368 }
369  
370  
371 sub link {
372 my ($self, $data_ar)=@_;
373 my $attr_hr=$data_ar->[$ATTR_IX];
374 my $url;
375 my $title=$attr_hr->{'annotations'};
376 my $text=$self->pull_node_text($data_ar, $NULL);
377 if ($attr_hr->{'xlink:href'}) {
378 $url=$attr_hr->{'xlink:href'};
379 }
380 elsif ($attr_hr->{'xl:href'}) {
381 $url=$attr_hr->{'xl:href'};
382 }
383 elsif (my $linkend=$attr_hr->{'linkend'}) {
384 $url="#${linkend}";
385  
386 #$text ||= $SP . $linkend;
387 $text ||= $linkend;
388 }
389 debug("link $title, $url");
390  
391 #$text ||= $SP . $url;
392 $text ||= $url;
393 return $self->_link($url, $text, $title);
394 }
395  
396  
397 sub listitem {
398 my ($self, $data_ar)=@_;
399 my $text=$self->pull_node_text($data_ar, $self->_listitem_join());
400 return $text;
401 }
402  
403  
404 sub mediaobject {
405 my ($self, $data_ar)=@_;
406  
407 #if ($self->find_parent($data_ar, 'figure')) {
408 # Are we delaying render ?
409 if ($self->find_parent($data_ar, $MEDIAOBJECT_DELAY_RENDER_AR)) {
410  
411 # render later
412 return $data_ar;
413 }
414 else {
415 return $self->_image_build($data_ar);
416 }
417 }
418  
419  
420 sub orderedlist {
421 my ($self, $data_ar)=@_;
422 my (@list, $count);
423 foreach my $text (@{$self->pull_node_text($data_ar)}) {
424 $count++;
425 push @list, $self->_list_item("$count. $text");
426 }
427  
428 #return join($CR2, grep {$_} $self->_list_begin(), @list, $self->_list_end);
429 return join($CR2, $self->_list_begin(), @list, $self->_list_end);
430 }
431  
432  
433 sub para {
434  
435 my ($self, $data_ar)=@_;
436  
437 #my $text=$self->pull_node_text($data_ar, $NULL);
438 my $text=$self->pull_node_text($data_ar, $SP);
439 return $text;
440  
441 }
442  
443  
444 sub thead {
445  
446 my ($self, $data_ar)=@_;
447 my @row;
448 foreach my $row_ar (@{$self->find_node($data_ar, 'row')}) {
449 foreach my $entry_ar (@{$self->find_node($row_ar, 'entry')}) {
450  
451 #print "thead entry_ar: $entry_ar\n";
452 my $text=$self->pull_node_text($entry_ar, $NULL);
453 $text=$self->text_wrap($text);
454 push @row, $self->_bold($text);
455 }
456 $self->{'_table'}{'thead'}=\@row;
457 last;
458 }
459 return undef;
460  
461 }
462  
463  
464 sub tbody {
465  
466 my ($self, $data_ar)=@_;
467 foreach my $row_ar (@{$self->find_node($data_ar, 'row')}) {
468 my @row;
469 foreach my $entry_ar (@{$self->find_node($row_ar, 'entry')}) {
470 my $text=$self->pull_node_text($entry_ar, $NULL);
471 $text=$self->text_wrap($text);
472 push @row, $text;
473 }
474 push @{$self->{'_table'}{'tbody'}}, \@row;
475  
476 #push @{$self->{'_table'}{'tbody'}},[map { undef } @row]
477 }
478 return undef;
479  
480 }
481  
482  
483 sub table {
484  
485 my ($self, $data_ar)=@_;
486 my $title=$self->pull_node_tag_text($data_ar, 'title', $NULL);
487 my $thead_ar=$self->{'_table'}{'thead'};
488 use Text::Table;
489  
490 #my $table_or=Text::Table->new((map {\"|", $_} @{$thead_ar}), \"|");
491 my $table_or=Text::Table->new((map {\'|', $_} @{$thead_ar}), \'|');
492  
493 my $tbody_ar=$self->{'_table'}{'tbody'};
494 foreach my $row_ar (@{$tbody_ar}) {
495 $table_or->load($row_ar);
496 }
497  
498 my @table;
499 push @table, $table_or->rule('-', '-');
500 push @table, $table_or->title();
501 push @table, $table_or->rule('-', '-');
502 my @row=$table_or->table();
503 foreach my $row (1..$#row) {
504 push @table, $row[$row];
505  
506 #push @table, $table_or->body_rule(' ', ' ') unless ($_ == $#row);
507 }
508 push @table, $table_or->body_rule('-', '-');
509  
510 #print $self->_code($table_or->stringify());
511 #my $table=$table_or->stringify();
512 return $title . $CR2 . join(undef, map {"${SP4}$_"} @table) . $CR2;
513  
514 #return $self->_code($table_or->stringify());
515  
516 }
517  
518  
519 sub procedure {
520  
521 my ($self, $data_ar)=@_;
522 my $title=$self->pull_node_tag_text($data_ar, 'title', $NULL);
523 my @step;
524 my $count;
525 foreach my $ar (@{$self->find_node($data_ar, 'step')}) {
526 $count++;
527 my $text=$self->pull_node_text($ar, $NULL);
528 push @step, "${count}\\. ${text}";
529 }
530 return join($CR2, $self->_bold($title), @step);
531  
532 }
533  
534  
535 sub programlisting {
536 my ($self, $data_ar)=@_;
537 my $attr_hr=$data_ar->[$ATTR_IX];
538 my $lang=$attr_hr->{'language'};
539 my $text=$self->pull_node_text($data_ar, $NULL);
540 $text="${CR2}```${lang}${CR}${text}${CR}```${CR2}";
541 return $text
542 }
543  
544  
545 sub menuchoice {
546  
547 my ($self, $data_ar)=@_;
548 my $text=$self->pull_node_text($data_ar, ' > ');
549 return $self->_bold($text);
550  
551 }
552  
553  
554 sub qandadiv {
555  
556 my ($self, $data_ar)=@_;
557 my $title=$self->pull_node_tag_text($data_ar, 'title', $NULL);
558 my $text=$self->pull_node_text($data_ar, $CR2);
559 return join($CR2, $self->_h2($title), $text);
560  
561 }
562  
563  
564 sub question {
565  
566 my ($self, $data_ar)=@_;
567 my $text=$self->pull_node_text($data_ar, $CR2);
568 return $self->_bold('Q:') . $SP . $text;
569  
570 }
571  
572  
573 sub answer {
574  
575 my ($self, $data_ar)=@_;
576 my $text=$self->pull_node_text($data_ar, $CR2);
577 return $self->_bold('A:') . $SP . $text;
578  
579 }
580  
581  
582 sub quote {
583  
584 my ($self, $data_ar)=@_;
585 my $text=$self->pull_node_text($data_ar, $NULL);
586 return qq{\"$text\"};
587 }
588  
589  
590 sub refmeta {
591 my ($self, $data_ar)=@_;
592 my ($refentrytitle, $manvolnum)=
593 $self->find_node_tag_text($data_ar, 'refentrytitle|manvolnum', $NULL);
594 my $text=$self->_h1("${refentrytitle}(${manvolnum})");
595 return $text;
596 }
597  
598  
599 sub refnamediv {
600  
601 my ($self, $data_ar)=@_;
602 my ($refname, $refpurpose)=
603 $self->find_node_tag_text($data_ar, 'refname|refpurpose', $NULL);
604 my $heading=$REFENTRY_TEXT_HR->{'name'};
605 my $text=$self->_h1($heading) . $CR2 . join(' - ', grep {$_} $refname, $refpurpose);
606 return $text;
607 }
608  
609  
610 sub refsection {
611 my ($self, $data_ar)=@_;
612 my ($title, $subtitle)=
613 $self->pull_node_tag_text($data_ar, 'title|subtitle', $NULL);
614 my $text=$self->pull_node_text($data_ar, $CR2);
615 return join($CR2, $self->_h1($title), $text);
616 }
617  
618  
619 sub refsynopsisdiv {
620 my ($self, $data_ar)=@_;
621  
622 #my $text=$self->pull_node_text($data_ar, $NULL);
623 my $text=$self->pull_node_text($data_ar, $CR2);
624 my $heading=$REFENTRY_TEXT_HR->{'synopsis'};
625 $text=$self->_h1($heading) . $CR2 . $text;
626 return $text;
627 }
628  
629  
630 sub sbr {
631 my ($self, $data_ar)=@_;
632  
633 # This gets cleaned up by the _code routine
634 return "<**SBR**>";
635 }
636  
637  
638 sub screen {
639 my ($self, $data_ar)=@_;
640 my $text=$self->pull_node_text($data_ar, $NULL);
641 my @text=($text=~/^(.*)$/gm);
642 return $CR2 . join($CR, map {"${SP4}$_"} @text) . $CR2;
643 }
644  
645  
646 sub sect1 {
647 my ($self, $data_ar)=@_;
648  
649 # Are we nested ?
650 #
651 my $count=1;
652 my $cr=sub {
653 my ($cr, $data_ar)=@_;
654 if (my $prnt_data_ar=$self->find_parent($data_ar, 'section')) {
655 $count++;
656 $cr->($cr, $prnt_data_ar);
657 }
658 else {
659 return undef;
660 }
661 };
662 $cr->($cr, $data_ar);
663  
664 # If count > 1 then yes, pretend we are sect2, sect3 etc/
665 if ($count > 1) {
666 my $sect="sect${count}";
667 return $self->$sect($data_ar);
668 }
669 else {
670 # Not nested
671 my $count_sect1=++$self->{'_sect1'};
672 delete @{$self}{qw(_sect2 _sect3 _sect4)};
673 return $self->_sect($data_ar, $count_sect1, 1);
674 }
675 }
676  
677  
678 sub sect2 {
679 my ($self, $data_ar)=@_;
680 my $count_sect1=($self->{'_sect1'}+1);
681 my $count_sect2=++$self->{'_sect2'};
682 delete @{$self}{qw(_sect3 _sect4)};
683 my $count="$count_sect1.$count_sect2";
684 return $self->_sect($data_ar, $count, 2);
685 }
686  
687  
688 sub sect3 {
689 my ($self, $data_ar)=@_;
690 my $count_sect1=($self->{'_sect1'}+1);
691 my $count_sect2=($self->{'_sect2'}+1);
692 my $count_sect3=++$self->{'_sect3'};
693 delete @{$self}{qw(_sect4)};
694 my $count="$count_sect1.$count_sect2.$count_sect3";
695 return $self->_sect($data_ar, $count, 3);
696 }
697  
698  
699 sub sect4 {
700 my ($self, $data_ar)=@_;
701 my $count_sect1=($self->{'_sect1'}+1);
702 my $count_sect2=($self->{'_sect2'}+1);
703 my $count_sect3=($self->{'_sect3'}+1);
704 my $count_sect4=++$self->{'_sect4'};
705 my $count="$count_sect1.$count_sect2.$count_sect3.$count_sect4";
706 return $self->_sect($data_ar, $count, 4);
707 }
708  
709  
710 sub _text {
711 my ($self, $data_ar)=@_;
712 my $text=$self->pull_node_text($data_ar, $CR2);
713  
714 # Clean up and extra blank lines
715 $text=~s/^(\s*${CR}){2,}/${CR}/gm;
716 return $text;
717 }
718  
719  
720 sub term {
721 my ($self, $data_ar)=@_;
722 my $text=$self->pull_node_text($data_ar, $NULL);
723  
724 #return $self->_bold($self->_code($text));
725 return $self->_bold($text);
726 }
727  
728  
729 sub ulink {
730 my ($self, $data_ar)=@_;
731 my $attr_hr=$data_ar->[$ATTR_IX];
732 my $url=$attr_hr->{'url'};
733 my $text=$self->pull_node_text($data_ar, $NULL);
734 return $self->_link($url, $text);
735 }
736  
737  
738 sub uri {
739 my ($self, $data_ar)=@_;
740 my $text=$self->pull_node_text($data_ar, $NULL);
741 return $SP . "<${text}>";
742 }
743  
744  
745 sub variablelist {
746 my ($self, $data_ar)=@_;
747 my @list;
748 foreach my $ar (@{$self->find_node($data_ar, 'varlistentry')}) {
749 my $text=$self->pull_node_text($ar, $self->_variablelist_join());
750 push @list, $self->_list_item("* $text");
751 }
752  
753 #return join($CR2, grep {$_} $self->_list_begin(), @list, $self->_list_end);
754 return join($CR2, $self->_list_begin(), @list, $self->_list_end);
755 }
756  
757  
758 sub warning { # synonym for caution, important, note, tip
759 my ($self, $data_ar)=@_;
760 my $tag=$data_ar->[$NODE_IX];
761 my $text=$self->pull_node_text($data_ar, $NULL);
762 $tag=lc($tag);
763 my $admonition=$self->_bold($ADMONITION_TEXT_HR->{$tag});
764 return $CR2 . "$admonition: $text";
765 }
766  
767  
768 sub footnote {
769 my ($self, $data_ar)=@_;
770 my $text=$self->pull_node_text($data_ar, $NULL);
771 push @{$self->{'footnote'}}, $text;
772 return undef;
773 }
774  
775  
776 sub xref0 {
777 my ($self, $data_ar)=@_;
778 my $attr_hr=$data_ar->[$ATTR_IX];
779 if (my $linkend=$attr_hr->{'linkend'}) {
780  
781 # Don't link at the moment
782 return $self->_italic($linkend);
783 }
784 else {
785 return undef;
786 }
787 }
788  
789  
790 sub _text_cleanup {
791  
792 my ($self, $text)=@_;
793 $text=~s/^(\s*${CR}){2,}/${CR}/gm;
794 return $text;
795  
796 }
797  
798  
799 1;
800 __END__