File Coverage

blib/lib/Text/Amuse/Compile.pm
Criterion Covered Total %
statement 270 280 96.4
branch 79 100 79.0
condition 28 48 58.3
subroutine 42 45 93.3
pod 16 16 100.0
total 435 489 88.9


line stmt bran cond sub pod time code
1             package Text::Amuse::Compile;
2              
3 57     57   2167051 use strict;
  57         446  
  57         1658  
4 57     57   266 use warnings FATAL => 'all';
  57         126  
  57         2883  
5              
6             use constant {
7             DEBUG => $ENV{AMW_DEBUG},
8 57     57   322 };
  57         90  
  57         4881  
9              
10 57     57   357 use File::Basename;
  57         100  
  57         5795  
11 57     57   30089 use File::Temp;
  57         862089  
  57         3486  
12 57     57   385 use File::Find;
  57         99  
  57         2603  
13 57     57   302 use File::Spec;
  57         111  
  57         1306  
14              
15 57     57   20969 use Text::Amuse::Functions qw/muse_fast_scan_header/;
  57         2019230  
  57         3744  
16 57     57   30912 use Text::Amuse::Compile::File;
  57         194  
  57         2111  
17 57     57   26390 use Text::Amuse::Compile::Merged;
  57         203  
  57         1820  
18 57     57   409 use Text::Amuse::Compile::MuseHeader;
  57         133  
  57         1284  
19 57     57   22397 use Text::Amuse::Compile::FileName;
  57         160  
  57         1780  
20 57     57   399 use Text::Amuse::Compile::Fonts;
  57         122  
  57         1083  
21 57     57   21939 use Text::Amuse::Compile::Fonts::Selected;
  57         200  
  57         4920  
22              
23 57     57   436 use Cwd;
  57         126  
  57         5732  
24 57     57   468 use Fcntl qw/:flock/;
  57         105  
  57         7429  
25 57     57   359 use Moo;
  57         108  
  57         290  
26 57     57   18951 use Types::Standard qw/Int Maybe Bool Str HashRef CodeRef Object ArrayRef InstanceOf/;
  57         121  
  57         427  
27              
28             =head1 NAME
29              
30             Text::Amuse::Compile - Compiler for Text::Amuse
31              
32             =head1 VERSION
33              
34             Version 1.87
35              
36             =cut
37              
38             our $VERSION = '1.87';
39              
40             =head1 SYNOPSIS
41              
42             use Text::Amuse::Compile;
43             my $compiler = Text::Amuse::Compile->new;
44             $compiler->compile($file1, $file2, $file3)
45              
46             =head1 METHODS/ACCESSORS
47              
48             =head2 CONSTRUCTOR
49              
50             =head3 new(ttdir => '.', pdf => 1, ...);
51              
52             Constructor. It will accept the following options
53              
54             Format options (by default all of them are activated);
55              
56             =over 4
57              
58             =item cleanup
59              
60             Remove auxiliary files after compilation (.status)
61              
62             =item fontspec
63              
64             Argument for L constructor. Passing these
65             triggers a new way to select fonts. The validation happens against a
66             list of font you can provide.
67              
68             =item epub_embed_fonts
69              
70             Boolean (default to true) which triggers the epub font embedding.
71              
72             =item luatex
73              
74             Use lualatex instead of xelatex.
75              
76             =item tex
77              
78             LaTeX output. Compatible with C and C (see below
79             for the packages needed).
80              
81             =item pdf
82              
83             Plain PDF without any imposition.
84              
85             =item a4_pdf
86              
87             PDF imposed on A4 paper
88              
89             =item lt_pdf
90              
91             PDF imposed on Letter paper
92              
93             =item html
94              
95             Full HTML output
96              
97             =item epub
98              
99             The EPUB
100              
101             =item bare_html
102              
103             The bare HTML, non
104              
105             =item zip
106              
107             The zipped sources
108              
109             =item sl_tex
110              
111             The Beamer LaTeX output, if the muse headers say so.
112              
113             =item sl_pdf
114              
115             The Beamer PDF output, if the muse headers say so.
116              
117             If the header has a C<#slides> header with some value (e.g., 1, yes,
118             ok, whatever) and if there some sectioning, create a pdf presentation
119             out of it.
120              
121             E.g., the following will not produce slides:
122              
123             #title Foo
124             #slides
125              
126             But this would
127              
128             #title Foo
129             #slides 1
130              
131             The value of the header is totally insignificant, as long is not
132             C or C or C<0> or empty, which disable them.
133              
134             Sections which contain the comment C<; noslide> are ignored. LaTeX
135             source is left in the tree with C<.sl.tex> extension, and the output
136             will have C<.sl.pdf> extension.
137              
138             =item slides
139              
140             Alias for sl_pdf.
141              
142             =item selected_font_main
143              
144             The selected main font (from the C hashref)
145              
146             =item selected_font_sans
147              
148             The selected sans font (from the C hashref)
149              
150             =item selected_font_mono
151              
152             The selected mono font (from the C hashref)
153              
154             =item selected_font_size
155              
156             The selected font size (from the C hashref)
157              
158             =item extra_opts
159              
160             An hashref of key/value pairs to pass to each template in the
161             C namespace. This is internal
162              
163             =item coverpage_only_if_toc
164              
165             Generate a cover page only if there is a ToC in the document.
166              
167             When compiling a virtual file (a collection) the option is ignored,
168             because L C always returns
169             true.
170              
171             =item include_paths
172              
173             Arrayref of absolute paths to look into for included files.
174              
175             =item extra
176              
177             In the constructor arguments, a shallow copy will be stored in
178             C. Using it as an accessor will return an hash with the
179             copy of C
180              
181             =item standalone
182              
183             Do not force bcor=0 and oneside for plain tex and pdf
184              
185             =back
186              
187             Template directory:
188              
189             =over 4
190              
191             =item ttdir
192              
193             The directory where to look for templates, named as format.tt
194              
195             =back
196              
197             You can retrieve the value by calling them on the object.
198              
199             =head3 available_methods
200              
201             Return a list of all the available compilation methods
202              
203             =head3 compile_methods
204              
205             Return the list of the methods which are going to be used.
206              
207             =cut
208              
209             has sl_tex => (is => 'ro', isa => Bool, default => sub { 0 });
210             has sl_pdf => (is => 'ro', isa => Bool, default => sub { 0 });
211             has luatex => (is => 'ro', isa => Bool, default => sub { 0 });
212             has zip => (is => 'ro', isa => Bool, default => sub { 0 });
213             has tex => (is => 'ro', isa => Bool, default => sub { 0 });
214             has pdf => (is => 'ro', isa => Bool, default => sub { 0 });
215             has a4_pdf => (is => 'ro', isa => Bool, default => sub { 0 });
216             has lt_pdf => (is => 'ro', isa => Bool, default => sub { 0 });
217             has epub => (is => 'ro', isa => Bool, default => sub { 0 });
218             has html => (is => 'ro', isa => Bool, default => sub { 0 });
219             has bare_html => (is => 'ro', isa => Bool, default => sub { 0 });
220              
221             has cleanup => (is => 'ro', isa => Bool, default => sub { 0 });
222              
223             has ttdir => (is => 'ro', isa => Maybe[Str]);
224             has templates => (is => 'lazy', isa => Object);
225              
226             has fontspec => (is => 'ro');
227             has fonts => (is => 'lazy', isa => InstanceOf['Text::Amuse::Compile::Fonts::Selected']);
228             has epub_embed_fonts => (is => 'ro', isa => Bool, default => sub { 1 });
229              
230             has include_paths => (is => 'ro',
231             default => sub { return [] },
232             isa => sub {
233             die "include_paths must be an arrayref" unless ref($_[0]) eq 'ARRAY';
234             foreach my $path (@{$_[0]}) {
235             die "include_paths must be defined" unless defined $path;
236             die "include_paths $path is empty" unless length($path);
237             die "include_paths $path must be absolute" unless File::Spec->file_name_is_absolute($path);
238             die "include_paths $path must exist" unless -d $path;
239             }
240             });
241              
242             sub _build_fonts {
243 224     224   12821 my $self = shift;
244 224         807 my $specs = $self->fontspec;
245 224         4334 my $fonts = Text::Amuse::Compile::Fonts->new($specs);
246 222   100     34075 my %args = (
247             size => $self->selected_font_size || 10,
248             all_fonts => $fonts,
249             );
250 222         1445 my @all_fonts = $fonts->all_fonts;
251 222         844 foreach my $type (qw/sans mono serif/) {
252 664         1694 my $method = $type . '_fonts';
253 664         3761 my @all = $fonts->$method;
254 664 100       2077 die "Missing $type font in the specification" unless @all;
255 663 100       1971 my $store = $type eq 'serif' ? 'main' : $type;
256 663         1373 my $smethod = "selected_font_${store}";
257 663 100       3087 if (my $selected = $self->$smethod) {
258 44         99 my ($got) = grep { $_->name eq $selected } @all_fonts;
  1149         1830  
259 44         148 $args{$store} = $got;
260             }
261 663 100       1638 unless ($args{$store}) {
262 621         12855 $self->logger->("$store font not found, using the default\n");
263 621         7105 $args{$store} = $all[0]; # if everything fails
264             }
265             }
266 221         6569 return Text::Amuse::Compile::Fonts::Selected->new(%args);
267             }
268              
269             has selected_font_main => (is => 'ro', isa => Maybe[Str]);
270             has selected_font_sans => (is => 'ro', isa => Maybe[Str]);
271             has selected_font_mono => (is => 'ro', isa => Maybe[Str]);
272             has selected_font_size => (is => 'ro', isa => Maybe[Int]);
273              
274             has standalone => (is => 'lazy', isa => Bool);
275             has extra_opts => (is => 'ro', isa => HashRef, default => sub { +{} });
276              
277             sub slides {
278 0     0 1 0 return shift->sl_pdf;
279             }
280              
281             has coverpage_only_if_toc => (is => 'ro', isa => Bool, default => sub { 0 });
282              
283             sub BUILDARGS {
284 245     245 1 1750997 my ($class, %params) = @_;
285 245 100       770 $params{extra_opts} = { %{ delete $params{extra} || {} } };
  245         2142  
286 245         785 my $all = 1;
287 245 100       1137 if (exists $params{slides}) {
288 15         36 my $slides = delete $params{slides};
289 15   100     60 $params{sl_pdf} ||= $slides;
290             }
291 245         1198 foreach my $format ($class->available_methods) {
292 1249 100       2552 if (exists $params{$format}) {
293 235         602 $all = 0;
294 235         660 last;
295             }
296             }
297 245 100       1030 if ($all) {
298 10         23 foreach my $format ($class->available_methods) {
299 100         151 $params{$format} = 1;
300             }
301             }
302 245         767 foreach my $dir (qw/ttdir/) {
303 245 50 66     1511 if (exists $params{$dir} and defined $params{$dir} and -d $params{$dir}) {
      66        
304 1         22 my $abs = File::Spec->rel2abs($params{$dir});
305 1         4 $params{$dir} = $abs;
306             }
307             }
308             # take out the fonts from the extra, for backcomp.
309 245         796 foreach my $type (qw/main sans mono/) {
310 735         2562 $params{"selected_font_$type"} = delete $params{extra_opts}{"${type}font"};
311             }
312 245         857 $params{selected_font_size} = delete $params{extra_opts}{fontsize};
313 245         4466 return \%params;
314             }
315              
316             sub available_methods {
317 573     573 1 2544 return (qw/bare_html
318             html
319             epub
320             a4_pdf
321             lt_pdf
322             tex
323             zip
324             pdf
325             sl_tex
326             sl_pdf
327             /);
328             }
329             sub compile_methods {
330 318     318 1 927 my $self = shift;
331 318         935 return grep { $self->$_ } $self->available_methods;
  3180         8222  
332             }
333              
334              
335              
336             sub extra {
337 300     300 1 2152 return %{ shift->extra_opts };
  300         8205  
338             }
339              
340              
341             sub _build_standalone {
342 218     218   7104 my $self = shift;
343 218 100 66     1940 if ($self->a4_pdf || $self->lt_pdf) {
344 2         29 return 0;
345             }
346             else {
347 216         3226 return 1;
348             }
349             }
350              
351             has logger => (is => 'rw',
352             isa => CodeRef,
353             default => sub { return sub { print @_ }; });
354              
355             has report_failure_sub => (is => 'rw',
356             isa => CodeRef,
357             default => sub {
358             return sub {
359             print "Failure to compile $_[0]\n";
360             }
361             });
362             has errors => (is => 'rwp', isa => ArrayRef, default => sub { [] });
363              
364              
365             =head2 BUILDARGS routine
366              
367             The C key is passed instead to C. Directories are
368             made absolute. If no formats are required explicitely, set them all to
369             true.
370              
371             =cut
372              
373             =head2 METHODS
374              
375             =head3 fonts
376              
377             The L object, constructed from
378             the fontspec argument and eventual C font keys passed.
379              
380             =head3 version
381              
382             Report version information
383              
384             =cut
385              
386             sub version {
387 0     0 1 0 my $self = shift;
388 0         0 my $musev = $Text::Amuse::VERSION;
389 0         0 my $selfv = $VERSION;
390 0         0 my $pdfv = $PDF::Imposition::VERSION;
391 0         0 return "Using Text::Amuse $musev, Text::Amuse::Compiler $selfv, " .
392             "PDF::Imposition $pdfv\n";
393             }
394              
395             =head3 logger($sub)
396              
397             Accessor/setter for the subroutine which will handle the logging.
398             Defaults to printing to the standard output.
399              
400             =head3 recursive_compile($directory)
401              
402             Compile recursive a directory, comparing the timestamps of the status
403             file with the muse file. If the status file is newer, the file is
404             ignored.
405              
406             Return a list of absolute path to the files processed. To infer the
407             success or the failure of each file look at the status file or at the
408             logs.
409              
410             =head3 find_muse_files($directory)
411              
412             Return a sorted list of files with extension .muse excluding illegal
413             names (including hidden files and directories).
414              
415             =head3 find_new_muse_files($directory)
416              
417             As above, but check the age of the status file and skip already
418             processed files.
419              
420             =cut
421              
422             sub find_muse_files {
423 5     5 1 2686 my ($self, $dir) = @_;
424 5         10 my @files;
425 5 50 33     89 die "$dir is not a dir" unless ($dir && -d $dir);
426             find( sub {
427 80     80   194 my $file = $_;
428             # file only
429 80 100       3129 return unless -f $file;
430 40 100       552 return unless $file =~ m/^[0-9a-z][0-9a-z-]+[0-9a-z]+\.muse$/;
431             # exclude hidden directories
432 20 100       59 if ($File::Find::dir =~ m/\./) {
433 8         70 my @dirs = File::Spec->splitdir($File::Find::dir);
434              
435             # for the purpose of filtering, the leading . is harmless
436 8 100 33     57 if (@dirs && $dirs[0] && $dirs[0] eq '.') {
      66        
437 4         9 shift(@dirs);
438             }
439              
440 8         20 my @dots = grep { m/^\./ } @dirs;
  24         58  
441 8 100       125 return if @dots;
442             }
443 15         622 push @files, File::Spec->rel2abs($file);
444 5         415 }, $dir);
445 5         77 return sort @files;
446             }
447              
448             sub find_new_muse_files {
449 4     4 1 5178 my ($self, $dir) = @_;
450 4         15 my @candidates = $self->find_muse_files($dir);
451 4         9 my @newf;
452 4         9 my $mtime = 9;
453 4         16 while (@candidates) {
454 12         27 my $f = shift(@candidates);
455 12 50 33     160 die "I was expecting a file here" unless $f && -f $f;
456 12         31 my $status = $f;
457 12         58 $status =~ s/\.muse$/.status/;
458 12 100       557 if (! -f $status) {
    50          
459 7         25 push @newf, $f;
460             }
461             elsif ((stat($f))[$mtime] > (stat($status))[$mtime]) {
462 0         0 push @newf, $f;
463             }
464             }
465 4         22 return @newf;
466             }
467              
468             sub recursive_compile {
469 2     2 1 1859 my ($self, $dir) = @_;
470 2         9 return $self->compile($self->find_new_muse_files($dir));
471             }
472              
473              
474             =head3 compile($file1, $file2, ...);
475              
476             Main method to get the job done, passing the list of muse files. You
477             can inspect the errors calling C. It does produce some output.
478              
479             The file may also be an hash reference. In this case, the compile will
480             act on a list of files and will merge them. Beware that so far only
481             the C and C options will work, while the other html methods
482             will throw exceptions or (worse probably) produce empty files. This
483             will be fixed soon. This feature is marked as B and
484             could change in the future.
485              
486             =head4 virtual file hashref
487              
488             The hash reference should have those mandatory fields:
489              
490             =over 4
491              
492             =item files
493              
494             An B of filenames without extension.
495              
496             =item path
497              
498             A mandatory directory where to find the above files.
499              
500             =back
501              
502             Optional keys
503              
504             =over 4
505              
506             =item name
507              
508             Default to virtual. This is the basename of the files which will be
509             produced. It's up to you to provide a sensible name we don't do any
510             check on that.
511              
512             =item suffix
513              
514             Defaults to '.muse' and you have no reason to change this.
515              
516             =back
517              
518             Every other key is the metadata of the new document, so usually you
519             want to set C and optionally C<author>. </td> </tr> <tr> <td class="h" > <a name="520">520</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="521">521</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Example: </td> </tr> <tr> <td class="h" > <a name="522">522</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="523">523</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $c->compile({ </td> </tr> <tr> <td class="h" > <a name="524">524</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # mandatory </td> </tr> <tr> <td class="h" > <a name="525">525</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> path => File::Spec->catdir(qw/t merged-dir/), </td> </tr> <tr> <td class="h" > <a name="526">526</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> files => [qw/first second/], </td> </tr> <tr> <td class="h" > <a name="527">527</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="528">528</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # recommended </td> </tr> <tr> <td class="h" > <a name="529">529</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> name => 'my-new-test', </td> </tr> <tr> <td class="h" > <a name="530">530</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> title => 'My new shiny test', </td> </tr> <tr> <td class="h" > <a name="531">531</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="532">532</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # optional </td> </tr> <tr> <td class="h" > <a name="533">533</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> subtitle => 'Another one', </td> </tr> <tr> <td class="h" > <a name="534">534</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> date => 'Today!', </td> </tr> <tr> <td class="h" > <a name="535">535</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> source => 'Text::Amuse::Compile', </td> </tr> <tr> <td class="h" > <a name="536">536</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }); </td> </tr> <tr> <td class="h" > <a name="537">537</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="538">538</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> You can pass as many hashref you want. </td> </tr> <tr> <td class="h" > <a name="539">539</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="540">540</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="541">541</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="542">542</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub compile { </td> </tr> <tr> <td class="h" > <a name="543">543</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#543-1"> 295 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#543-1"> 1 </a> </td> <td > 193882 </td> <td class="s"> my ($self, @files) = @_; </td> </tr> <tr> <td class="h" > <a name="544">544</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1523 </td> <td class="s"> $self->reset_errors; </td> </tr> <tr> <td class="h" > <a name="545">545</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 12125 </td> <td class="s"> my $cwd = getcwd; </td> </tr> <tr> <td class="h" > <a name="546">546</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 878 </td> <td class="s"> my @compiled; </td> </tr> <tr> <td class="h" > <a name="547">547</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 952 </td> <td class="s"> foreach my $file (@files) { </td> </tr> <tr> <td class="h" > <a name="548">548</a> </td> <td class="c3" > 297 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#548-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 4208 </td> <td class="s"> chdir $cwd or die "Couldn't chdir into $cwd $!"; </td> </tr> <tr> <td class="h" > <a name="549">549</a> </td> <td class="c3" > 297 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#549-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1385 </td> <td class="s"> if (ref($file)) { </td> </tr> <tr> <td class="h" > <a name="550">550</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 41 </td> <td class="s"> eval { $self->_compile_virtual_file($file); }; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 184 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="551">551</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="552">552</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="553">553</a> </td> <td class="c3" > 281 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 700 </td> <td class="s"> eval { $self->_compile_file($file); }; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 281 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1287 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="554">554</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="555">555</a> </td> <td class="c3" > 297 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1394 </td> <td class="s"> my $fatal = $@; </td> </tr> <tr> <td class="h" > <a name="556">556</a> </td> <td class="c3" > 297 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#556-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 5837 </td> <td class="s"> chdir $cwd or die "Couldn't chdir into $cwd $!"; </td> </tr> <tr> <td class="h" > <a name="557">557</a> </td> <td class="c3" > 297 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#557-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1641 </td> <td class="s"> if ($fatal) { </td> </tr> <tr> <td class="h" > <a name="558">558</a> </td> <td class="c3" > 3 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 77 </td> <td class="s"> $self->logger->($fatal); </td> </tr> <tr> <td class="h" > <a name="559">559</a> </td> <td class="c3" > 3 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 52 </td> <td class="s"> $self->add_errors("$file $fatal"); </td> </tr> <tr> <td class="h" > <a name="560">560</a> </td> <td class="c3" > 3 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 64 </td> <td class="s"> $self->report_failure_sub->($file); </td> </tr> <tr> <td class="h" > <a name="561">561</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="562">562</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="563">563</a> </td> <td class="c3" > 294 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1718 </td> <td class="s"> push @compiled, $file; </td> </tr> <tr> <td class="h" > <a name="564">564</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="565">565</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="566">566</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2078 </td> <td class="s"> return @compiled; </td> </tr> <tr> <td class="h" > <a name="567">567</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="568">568</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="569">569</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub _compile_virtual_file { </td> </tr> <tr> <td class="h" > <a name="570">570</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#570-1"> 16 </a> </td> <td >   </td> <td > 56 </td> <td class="s"> my ($self, $vfile) = @_; </td> </tr> <tr> <td class="h" > <a name="571">571</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # check if the reference is good </td> </tr> <tr> <td class="h" > <a name="572">572</a> </td> <td class="c3" > 16 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#572-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 74 </td> <td class="s"> die "Virtual file is not a hashref" unless ref($vfile) eq 'HASH'; </td> </tr> <tr> <td class="h" > <a name="573">573</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 128 </td> <td class="s"> my %virtual = %$vfile; </td> </tr> <tr> <td class="h" > <a name="574">574</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 59 </td> <td class="s"> my $files = delete $virtual{files}; </td> </tr> <tr> <td class="h" > <a name="575">575</a> </td> <td class="c3" > 16 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#575-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#575-1"> 33 </a> </td> <td >   </td> <td >   </td> <td > 133 </td> <td class="s"> die "No file list found" unless $files && @$files; </td> </tr> <tr> <td class="h" > <a name="576">576</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 41 </td> <td class="s"> my $path = delete $virtual{path}; </td> </tr> <tr> <td class="h" > <a name="577">577</a> </td> <td class="c3" > 16 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#577-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#577-1"> 33 </a> </td> <td >   </td> <td >   </td> <td > 338 </td> <td class="s"> die "No directory path" unless $path && -d $path; </td> </tr> <tr> <td class="h" > <a name="578">578</a> </td> <td class="c3" > 16 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#578-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 167 </td> <td class="s"> chdir $path or die "Couldn't chdir into $path $!"; </td> </tr> <tr> <td class="h" > <a name="579">579</a> </td> <td class="c3" > 16 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#579-1"> 50 </a> </td> <td >   </td> <td >   </td> <td > 117 </td> <td class="s"> my $suffix = delete($virtual{suffix}) || '.muse'; </td> </tr> <tr> <td class="h" > <a name="580">580</a> </td> <td class="c3" > 16 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#580-1"> 50 </a> </td> <td >   </td> <td >   </td> <td > 67 </td> <td class="s"> my $name = delete($virtual{name}) || 'virtual'; </td> </tr> <tr> <td class="h" > <a name="581">581</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 507 </td> <td class="s"> $self->logger->("Working on virtual file in " . getcwd(). "\n"); </td> </tr> <tr> <td class="h" > <a name="582">582</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 119 </td> <td class="s"> my @filelist = map { Text::Amuse::Compile::FileName->new($_) } @$files; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 53 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 300 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="583">583</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $doc = Text::Amuse::Compile::Merged->new(files => \@filelist, </td> </tr> <tr> <td class="h" > <a name="584">584</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 63 </td> <td class="s"> include_paths => [ @{$self->include_paths} ], </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 245 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="585">585</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> %virtual); </td> </tr> <tr> <td class="h" > <a name="586">586</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $muse = Text::Amuse::Compile::File->new( </td> </tr> <tr> <td class="h" > <a name="587">587</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> name => $name, </td> </tr> <tr> <td class="h" > <a name="588">588</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> suffix => $suffix, </td> </tr> <tr> <td class="h" > <a name="589">589</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> luatex => $self->luatex, </td> </tr> <tr> <td class="h" > <a name="590">590</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ttdir => $self->ttdir, </td> </tr> <tr> <td class="h" > <a name="591">591</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> options => { $self->extra }, </td> </tr> <tr> <td class="h" > <a name="592">592</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> document => $doc, </td> </tr> <tr> <td class="h" > <a name="593">593</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> logger => $self->logger, </td> </tr> <tr> <td class="h" > <a name="594">594</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> virtual => 1, </td> </tr> <tr> <td class="h" > <a name="595">595</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> standalone => $self->standalone, </td> </tr> <tr> <td class="h" > <a name="596">596</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> fonts => $self->fonts, </td> </tr> <tr> <td class="h" > <a name="597">597</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> epub_embed_fonts => $self->epub_embed_fonts, </td> </tr> <tr> <td class="h" > <a name="598">598</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 214 </td> <td class="s"> include_paths => [ @{$self->include_paths} ], </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 9279 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="599">599</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="600">600</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1503 </td> <td class="s"> $self->_muse_compile($muse); </td> </tr> <tr> <td class="h" > <a name="601">601</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="602">602</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="603">603</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="604">604</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub _compile_file { </td> </tr> <tr> <td class="h" > <a name="605">605</a> </td> <td class="c3" > 281 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#605-1"> 281 </a> </td> <td >   </td> <td > 955 </td> <td class="s"> my ($self, $file) = @_; </td> </tr> <tr> <td class="h" > <a name="606">606</a> </td> <td class="c3" > 281 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3238 </td> <td class="s"> my $fileobj = Text::Amuse::Compile::FileName->new($file); </td> </tr> <tr> <td class="h" > <a name="607">607</a> </td> <td class="c3" > 281 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#607-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#607-1"> 66 </a> </td> <td >   </td> <td >   </td> <td > 2406 </td> <td class="s"> die "$file is not a file" unless $fileobj && -f $fileobj->full_path; </td> </tr> <tr> <td class="h" > <a name="608">608</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="609">609</a> </td> <td class="c3" > 280 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#609-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1580 </td> <td class="s"> if (my $path = $fileobj->path) { </td> </tr> <tr> <td class="h" > <a name="610">610</a> </td> <td class="c3" > 280 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#610-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 2708 </td> <td class="s"> chdir $path or die "Cannot chdir into $path from " . getcwd() . "\n" ; </td> </tr> <tr> <td class="h" > <a name="611">611</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="612">612</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="613">613</a> </td> <td class="c3" > 280 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1349 </td> <td class="s"> my $filename = $fileobj->filename; </td> </tr> <tr> <td class="h" > <a name="614">614</a> </td> <td class="c3" > 280 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 8984 </td> <td class="s"> $self->logger->("Working on $filename file in " . getcwd(). "\n"); </td> </tr> <tr> <td class="h" > <a name="615">615</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="616">616</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my %args = ( </td> </tr> <tr> <td class="h" > <a name="617">617</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> name => $fileobj->name, </td> </tr> <tr> <td class="h" > <a name="618">618</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> suffix => $fileobj->suffix, </td> </tr> <tr> <td class="h" > <a name="619">619</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ttdir => $self->ttdir, </td> </tr> <tr> <td class="h" > <a name="620">620</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> options => { $self->extra }, </td> </tr> <tr> <td class="h" > <a name="621">621</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> logger => $self->logger, </td> </tr> <tr> <td class="h" > <a name="622">622</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> standalone => $self->standalone, </td> </tr> <tr> <td class="h" > <a name="623">623</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> fonts => $self->fonts, </td> </tr> <tr> <td class="h" > <a name="624">624</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> epub_embed_fonts => $self->epub_embed_fonts, </td> </tr> <tr> <td class="h" > <a name="625">625</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> luatex => $self->luatex, </td> </tr> <tr> <td class="h" > <a name="626">626</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> fileobj => $fileobj, </td> </tr> <tr> <td class="h" > <a name="627">627</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> coverpage_only_if_toc => $self->coverpage_only_if_toc, </td> </tr> <tr> <td class="h" > <a name="628">628</a> </td> <td class="c3" > 280 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4692 </td> <td class="s"> include_paths => [ @{$self->include_paths} ], </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 279 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 180430 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="629">629</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="630">630</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="631">631</a> </td> <td class="c3" > 279 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 6592 </td> <td class="s"> my $muse = Text::Amuse::Compile::File->new(%args); </td> </tr> <tr> <td class="h" > <a name="632">632</a> </td> <td class="c3" > 279 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 8952 </td> <td class="s"> $self->_muse_compile($muse); </td> </tr> <tr> <td class="h" > <a name="633">633</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="634">634</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="635">635</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # write the status file and unlock it after that. </td> </tr> <tr> <td class="h" > <a name="636">636</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="637">637</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub _write_status_file { </td> </tr> <tr> <td class="h" > <a name="638">638</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#638-1"> 295 </a> </td> <td >   </td> <td > 1470 </td> <td class="s"> my ($self, $fh, $status, @diagnostics) = @_; </td> </tr> <tr> <td class="h" > <a name="639">639</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 12912 </td> <td class="s"> my $localtime = localtime(); </td> </tr> <tr> <td class="h" > <a name="640">640</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2710 </td> <td class="s"> my %avail = ( </td> </tr> <tr> <td class="h" > <a name="641">641</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> FAILED => 1, </td> </tr> <tr> <td class="h" > <a name="642">642</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> DELETED => 1, </td> </tr> <tr> <td class="h" > <a name="643">643</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> OK => 1, </td> </tr> <tr> <td class="h" > <a name="644">644</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="645">645</a> </td> <td class="c3" > 295 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#645-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1768 </td> <td class="s"> die unless $avail{$status}; </td> </tr> <tr> <td class="h" > <a name="646">646</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4197 </td> <td class="s"> print $fh "$status $$ $localtime\n"; </td> </tr> <tr> <td class="h" > <a name="647">647</a> </td> <td class="c3" > 295 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#647-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1318 </td> <td class="s"> if (@diagnostics) { </td> </tr> <tr> <td class="h" > <a name="648">648</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s"> print $fh "\n"; </td> </tr> <tr> <td class="h" > <a name="649">649</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s"> foreach my $diag (@diagnostics) { </td> </tr> <tr> <td class="h" > <a name="650">650</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4 </td> <td class="s"> print $fh "$diag\n"; </td> </tr> <tr> <td class="h" > <a name="651">651</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="652">652</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="653">653</a> </td> <td class="c3" > 295 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#653-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 13102 </td> <td class="s"> flock($fh, LOCK_UN) or die "Cannot unlock status file\n"; </td> </tr> <tr> <td class="h" > <a name="654">654</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 11229 </td> <td class="s"> close $fh; </td> </tr> <tr> <td class="h" > <a name="655">655</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="656">656</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="657">657</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub _muse_compile { </td> </tr> <tr> <td class="h" > <a name="658">658</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#658-1"> 295 </a> </td> <td >   </td> <td > 1047 </td> <td class="s"> my ($self, $muse) = @_; </td> </tr> <tr> <td class="h" > <a name="659">659</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1507 </td> <td class="s"> my $statusfile = $muse->status_file; </td> </tr> <tr> <td class="h" > <a name="660">660</a> </td> <td class="c3" > 295 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#660-1"> 50 </a> </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#660-1"> 19 </a> </td> <td >   </td> <td > 37676 </td> <td class="s"> open (my $fhlock, '>:encoding(utf-8)', $statusfile) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 19 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 147 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 19 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 39 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 19 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 184 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="661">661</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> or die "Cannot open $statusfile\n!"; </td> </tr> <tr> <td class="h" > <a name="662">662</a> </td> <td class="c3" > 295 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#662-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 49246 </td> <td class="s"> flock($fhlock, LOCK_EX | LOCK_NB) or die "Cannot acquire lock on $statusfile"; </td> </tr> <tr> <td class="h" > <a name="663">663</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="664">664</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 5001187 </td> <td class="s"> sleep 5 if DEBUG; </td> </tr> <tr> <td class="h" > <a name="665">665</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="666">666</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 898 </td> <td class="s"> my @fatals; </td> </tr> <tr> <td class="h" > <a name="667">667</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my @warnings; </td> </tr> <tr> <td class="h" > <a name="668">668</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="669">669</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1908 </td> <td class="s"> $muse->purge_all unless DEBUG; </td> </tr> <tr> <td class="h" > <a name="670">670</a> </td> <td class="c3" > 295 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#670-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 9070 </td> <td class="s"> if ($muse->is_deleted) { </td> </tr> <tr> <td class="h" > <a name="671">671</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 60 </td> <td class="s"> $self->_write_status_file($fhlock, 'DELETED'); </td> </tr> <tr> <td class="h" > <a name="672">672</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 28 </td> <td class="s"> return; </td> </tr> <tr> <td class="h" > <a name="673">673</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="674">674</a> </td> <td class="c3" > 294 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 20436 </td> <td class="s"> foreach my $method ($self->compile_methods) { </td> </tr> <tr> <td class="h" > <a name="675">675</a> </td> <td class="c3" > 434 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#675-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#675-1"> 66 </a> </td> <td >   </td> <td >   </td> <td > 3414 </td> <td class="s"> if ($method eq 'sl_pdf' or $method eq 'sl_tex') { </td> </tr> <tr> <td class="h" > <a name="676">676</a> </td> <td class="c3" > 16 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#676-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 303 </td> <td class="s"> unless ($muse->wants_slides) { </td> </tr> <tr> <td class="h" > <a name="677">677</a> </td> <td class="c3" > 7 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 424 </td> <td class="s"> $self->logger->("* Slides not required\n"); </td> </tr> <tr> <td class="h" > <a name="678">678</a> </td> <td class="c3" > 7 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 33 </td> <td class="s"> next; </td> </tr> <tr> <td class="h" > <a name="679">679</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="680">680</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="681">681</a> </td> <td class="c3" > 427 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1478 </td> <td class="s"> my $output = eval { </td> </tr> <tr> <td class="h" > <a name="682">682</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> local $SIG{__WARN__} = sub { </td> </tr> <tr> <td class="h" > <a name="683">683</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#683-1"> 1 </a> </td> <td >   </td> <td > 308 </td> <td class="s"> push @warnings, @_; </td> </tr> <tr> <td class="h" > <a name="684">684</a> </td> <td class="c3" > 427 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3898 </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="685">685</a> </td> <td class="c3" > 427 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2702 </td> <td class="s"> $muse->$method </td> </tr> <tr> <td class="h" > <a name="686">686</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="687">687</a> </td> <td class="c3" > 427 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#687-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 85678 </td> <td class="s"> if ($@) { </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#-2"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="688">688</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s"> push @fatals, $@; </td> </tr> <tr> <td class="h" > <a name="689">689</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="690">690</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="691">691</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> elsif ($output) { </td> </tr> <tr> <td class="h" > <a name="692">692</a> </td> <td class="c3" > 426 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 18948 </td> <td class="s"> $self->logger->("* Created $output\n"); </td> </tr> <tr> <td class="h" > <a name="693">693</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="694">694</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="695">695</a> </td> <td class="c0" > <a href="#829"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s"> $self->logger->("* $method skipped\n"); </td> </tr> <tr> <td class="h" > <a name="696">696</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="697">697</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="698">698</a> </td> <td class="c3" > 294 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#698-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 6582 </td> <td class="s"> if (@fatals) { </td> </tr> <tr> <td class="h" > <a name="699">699</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 6 </td> <td class="s"> $self->_write_status_file($fhlock, 'FAILED', @fatals); </td> </tr> <tr> <td class="h" > <a name="700">700</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 138 </td> <td class="s"> die join(" ", @fatals); </td> </tr> <tr> <td class="h" > <a name="701">701</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="702">702</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="703">703</a> </td> <td class="c3" > 293 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1955 </td> <td class="s"> $self->_write_status_file($fhlock, 'OK'); </td> </tr> <tr> <td class="h" > <a name="704">704</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="705">705</a> </td> <td class="c3" > 293 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#705-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 3068 </td> <td class="s"> $muse->cleanup if $self->cleanup; </td> </tr> <tr> <td class="h" > <a name="706">706</a> </td> <td class="c3" > 293 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 118443 </td> <td class="s"> foreach my $warn (@warnings) { </td> </tr> <tr> <td class="h" > <a name="707">707</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#707-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 27 </td> <td class="s"> $self->logger->("Warning: $warn") if $warn; </td> </tr> <tr> <td class="h" > <a name="708">708</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="709">709</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="710">710</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="711">711</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub _suffix_for_method { </td> </tr> <tr> <td class="h" > <a name="712">712</a> </td> <td class="c3" > 27 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#712-1"> 27 </a> </td> <td >   </td> <td > 58 </td> <td class="s"> my ($self, $method) = @_; </td> </tr> <tr> <td class="h" > <a name="713">713</a> </td> <td class="c3" > 27 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#713-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 57 </td> <td class="s"> return unless $method; </td> </tr> <tr> <td class="h" > <a name="714">714</a> </td> <td class="c3" > 27 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 40 </td> <td class="s"> my $ext = $method; </td> </tr> <tr> <td class="h" > <a name="715">715</a> </td> <td class="c3" > 27 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 77 </td> <td class="s"> $ext =~ s/_/./g; </td> </tr> <tr> <td class="h" > <a name="716">716</a> </td> <td class="c3" > 27 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 52 </td> <td class="s"> $ext = '.' . $ext; </td> </tr> <tr> <td class="h" > <a name="717">717</a> </td> <td class="c3" > 27 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 69 </td> <td class="s"> return $ext; </td> </tr> <tr> <td class="h" > <a name="718">718</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="719">719</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="720">720</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 file_needs_compilation </td> </tr> <tr> <td class="h" > <a name="721">721</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="722">722</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Returns true if the file has already been compiled, false if some </td> </tr> <tr> <td class="h" > <a name="723">723</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> output file is missing or stale. </td> </tr> <tr> <td class="h" > <a name="724">724</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="725">725</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 parse_muse_header($file) </td> </tr> <tr> <td class="h" > <a name="726">726</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="727">727</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Return a L<Text::Amuse::Compile::MuseHeader> object for the given </td> </tr> <tr> <td class="h" > <a name="728">728</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> file. </td> </tr> <tr> <td class="h" > <a name="729">729</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="730">730</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="731">731</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="732">732</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub _check_file_basename { </td> </tr> <tr> <td class="h" > <a name="733">733</a> </td> <td class="c3" > 29 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#733-1"> 29 </a> </td> <td >   </td> <td > 55 </td> <td class="s"> my ($self, $file) = @_; </td> </tr> <tr> <td class="h" > <a name="734">734</a> </td> <td class="c3" > 29 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 148 </td> <td class="s"> my $fileobj = Text::Amuse::Compile::FileName->new($file); </td> </tr> <tr> <td class="h" > <a name="735">735</a> </td> <td class="c3" > 29 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 95 </td> <td class="s"> return File::Spec->catfile($fileobj->path, $fileobj->name); </td> </tr> <tr> <td class="h" > <a name="736">736</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="737">737</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="738">738</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub parse_muse_header { </td> </tr> <tr> <td class="h" > <a name="739">739</a> </td> <td class="c3" > 53 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#739-1"> 53 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#739-1"> 1 </a> </td> <td > 310 </td> <td class="s"> my ($self, $file) = @_; </td> </tr> <tr> <td class="h" > <a name="740">740</a> </td> <td class="c3" > 53 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 391 </td> <td class="s"> my $path = Text::Amuse::Compile::FileName->new($file)->full_path; </td> </tr> <tr> <td class="h" > <a name="741">741</a> </td> <td class="c3" > 53 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 299 </td> <td class="s"> return Text::Amuse::Compile::MuseHeader->new(muse_fast_scan_header($path)); </td> </tr> <tr> <td class="h" > <a name="742">742</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="743">743</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="744">744</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="745">745</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub file_needs_compilation { </td> </tr> <tr> <td class="h" > <a name="746">746</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#746-1"> 16 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#746-1"> 1 </a> </td> <td > 5016 </td> <td class="s"> my ($self, $file) = @_; </td> </tr> <tr> <td class="h" > <a name="747">747</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 31 </td> <td class="s"> my $need = 0; </td> </tr> <tr> <td class="h" > <a name="748">748</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 25 </td> <td class="s"> my $mtime = 9; </td> </tr> <tr> <td class="h" > <a name="749">749</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 40 </td> <td class="s"> my $basename = $self->_check_file_basename($file); </td> </tr> <tr> <td class="h" > <a name="750">750</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 49 </td> <td class="s"> my $header = $self->parse_muse_header($file); </td> </tr> <tr> <td class="h" > <a name="751">751</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1863 </td> <td class="s"> foreach my $m ($self->compile_methods) { </td> </tr> <tr> <td class="h" > <a name="752">752</a> </td> <td class="c3" > 22 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 70 </td> <td class="s"> my $outsuffix = $self->_suffix_for_method($m); </td> </tr> <tr> <td class="h" > <a name="753">753</a> </td> <td class="c3" > 22 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 44 </td> <td class="s"> my $outfile = $basename . $outsuffix; </td> </tr> <tr> <td class="h" > <a name="754">754</a> </td> <td class="c3" > 22 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#754-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#754-1"> 66 </a> </td> <td >   </td> <td >   </td> <td > 77 </td> <td class="s"> if ($m eq 'sl_tex' or $m eq 'sl_pdf') { </td> </tr> <tr> <td class="h" > <a name="755">755</a> </td> <td class="c3" > 11 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#755-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 197 </td> <td class="s"> next unless $header->wants_slides; </td> </tr> <tr> <td class="h" > <a name="756">756</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="757">757</a> </td> <td class="c3" > 15 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#757-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#757-1"> 66 </a> </td> <td >   </td> <td >   </td> <td > 445 </td> <td class="s"> if (-f $outfile and (stat($outfile))[$mtime] >= (stat($file))[$mtime]) { </td> </tr> <tr> <td class="h" > <a name="758">758</a> </td> <td class="c3" > 11 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 24 </td> <td class="s"> print "$outfile is OK\n" if DEBUG; </td> </tr> <tr> <td class="h" > <a name="759">759</a> </td> <td class="c3" > 11 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 32 </td> <td class="s"> next; </td> </tr> <tr> <td class="h" > <a name="760">760</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="761">761</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="762">762</a> </td> <td class="c3" > 4 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 18 </td> <td class="s"> print "$outfile is NOT OK\n" if DEBUG; </td> </tr> <tr> <td class="h" > <a name="763">763</a> </td> <td class="c3" > 4 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 12 </td> <td class="s"> $need = 1; </td> </tr> <tr> <td class="h" > <a name="764">764</a> </td> <td class="c3" > 4 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 9 </td> <td class="s"> last; </td> </tr> <tr> <td class="h" > <a name="765">765</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="766">766</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="767">767</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 290 </td> <td class="s"> return $need; </td> </tr> <tr> <td class="h" > <a name="768">768</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="769">769</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="770">770</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 purge(@files) </td> </tr> <tr> <td class="h" > <a name="771">771</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="772">772</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Remove all the files produced by the compilation of the files passed </td> </tr> <tr> <td class="h" > <a name="773">773</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> as arguments. </td> </tr> <tr> <td class="h" > <a name="774">774</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="775">775</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="776">776</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="777">777</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub purge { </td> </tr> <tr> <td class="h" > <a name="778">778</a> </td> <td class="c3" > 13 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#778-1"> 13 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#778-1"> 1 </a> </td> <td > 2231 </td> <td class="s"> my ($self, @files) = @_; </td> </tr> <tr> <td class="h" > <a name="779">779</a> </td> <td class="c3" > 13 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 34 </td> <td class="s"> foreach my $file (@files) { </td> </tr> <tr> <td class="h" > <a name="780">780</a> </td> <td class="c3" > 13 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 33 </td> <td class="s"> my $basename = $self->_check_file_basename($file); </td> </tr> <tr> <td class="h" > <a name="781">781</a> </td> <td class="c3" > 13 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 101 </td> <td class="s"> foreach my $ext (Text::Amuse::Compile::File->purged_extensions) { </td> </tr> <tr> <td class="h" > <a name="782">782</a> </td> <td class="c3" > 351 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#782-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 760 </td> <td class="s"> die "?" if $ext eq '.muse'; </td> </tr> <tr> <td class="h" > <a name="783">783</a> </td> <td class="c3" > 351 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 581 </td> <td class="s"> my $produced = $basename . $ext; </td> </tr> <tr> <td class="h" > <a name="784">784</a> </td> <td class="c3" > 351 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#784-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 3604 </td> <td class="s"> if (-f $produced) { </td> </tr> <tr> <td class="h" > <a name="785">785</a> </td> <td class="c3" > 5 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 147 </td> <td class="s"> $self->logger->("Purging $produced\n"); </td> </tr> <tr> <td class="h" > <a name="786">786</a> </td> <td class="c3" > 5 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#786-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 296 </td> <td class="s"> unlink $produced or warn "Cannot unlink $produced $!"; </td> </tr> <tr> <td class="h" > <a name="787">787</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="788">788</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="789">789</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="790">790</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="791">791</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="792">792</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="793">793</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 report_failure_sub(sub { push @problems, $_[0] }); </td> </tr> <tr> <td class="h" > <a name="794">794</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="795">795</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> You can set the sub to be used to report problems using this accessor. </td> </tr> <tr> <td class="h" > <a name="796">796</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> It will receive as first argument the file which led to failure. </td> </tr> <tr> <td class="h" > <a name="797">797</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="798">798</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The actual errors are logged by the C<logger> sub. </td> </tr> <tr> <td class="h" > <a name="799">799</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="800">800</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 errors </td> </tr> <tr> <td class="h" > <a name="801">801</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="802">802</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Accessor to the catched errors. It returns a list of strings. </td> </tr> <tr> <td class="h" > <a name="803">803</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="804">804</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 add_errors($error1, $error2,...) </td> </tr> <tr> <td class="h" > <a name="805">805</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="806">806</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Add an error. [Internal] </td> </tr> <tr> <td class="h" > <a name="807">807</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="808">808</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 reset_errors </td> </tr> <tr> <td class="h" > <a name="809">809</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="810">810</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Reset the errors </td> </tr> <tr> <td class="h" > <a name="811">811</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="812">812</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 has_errors </td> </tr> <tr> <td class="h" > <a name="813">813</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="814">814</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Return the number of errors (handy to use as a boolean). </td> </tr> <tr> <td class="h" > <a name="815">815</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="816">816</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="817">817</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="818">818</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub add_errors { </td> </tr> <tr> <td class="h" > <a name="819">819</a> </td> <td class="c3" > 3 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#819-1"> 3 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#819-1"> 1 </a> </td> <td > 12 </td> <td class="s"> my ($self, @args) = @_; </td> </tr> <tr> <td class="h" > <a name="820">820</a> </td> <td class="c3" > 3 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 7 </td> <td class="s"> push @{$self->errors}, @args; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 3 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 22 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="821">821</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="822">822</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="823">823</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub reset_errors { </td> </tr> <tr> <td class="h" > <a name="824">824</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#824-1"> 295 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#824-1"> 1 </a> </td> <td > 834 </td> <td class="s"> my $self = shift; </td> </tr> <tr> <td class="h" > <a name="825">825</a> </td> <td class="c3" > 295 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 8179 </td> <td class="s"> $self->_set_errors([]); </td> </tr> <tr> <td class="h" > <a name="826">826</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="827">827</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="828">828</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub has_errors { </td> </tr> <tr> <td class="h" > <a name="829">829</a> </td> <td class="c0" > <a href="# "> 0 </a> </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#829-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#829-1"> 1 </a> </td> <td > 0 </td> <td class="s"> return scalar(@{ shift->errors }); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 0 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="830">830</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="831">831</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="832">832</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 TeX live packages needed. </td> </tr> <tr> <td class="h" > <a name="833">833</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="834">834</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> You need the xetex scheme plus the following packages: fontspec, </td> </tr> <tr> <td class="h" > <a name="835">835</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> polyglossia, pzdr, wrapfig, footmisc, ulem, microtype, zapfding. </td> </tr> <tr> <td class="h" > <a name="836">836</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="837">837</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> For the luatex options, same as above plus luatex (and the lualatex </td> </tr> <tr> <td class="h" > <a name="838">838</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> format), luatexbase, luaotfload. </td> </tr> <tr> <td class="h" > <a name="839">839</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="840">840</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The luatex option could give better microtypography results but is </td> </tr> <tr> <td class="h" > <a name="841">841</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> slower (x4) and requires more memory (x2). </td> </tr> <tr> <td class="h" > <a name="842">842</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="843">843</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 INTERNAL CONSTANTS </td> </tr> <tr> <td class="h" > <a name="844">844</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="845">845</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 DEBUG </td> </tr> <tr> <td class="h" > <a name="846">846</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="847">847</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Set from AMW_DEBUG environment. </td> </tr> <tr> <td class="h" > <a name="848">848</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="849">849</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 AUTHOR </td> </tr> <tr> <td class="h" > <a name="850">850</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="851">851</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Marco Pessotto, C<< <melmothx at gmail.com> >> </td> </tr> <tr> <td class="h" > <a name="852">852</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="853">853</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 BUGS </td> </tr> <tr> <td class="h" > <a name="854">854</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="855">855</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Please mail the author and provide a minimal example to add to the </td> </tr> <tr> <td class="h" > <a name="856">856</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> test suite. </td> </tr> <tr> <td class="h" > <a name="857">857</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="858">858</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 SUPPORT </td> </tr> <tr> <td class="h" > <a name="859">859</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="860">860</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> You can find documentation for this module with the perldoc command. </td> </tr> <tr> <td class="h" > <a name="861">861</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="862">862</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> perldoc Text::Amuse::Compile </td> </tr> <tr> <td class="h" > <a name="863">863</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="864">864</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 LICENSE </td> </tr> <tr> <td class="h" > <a name="865">865</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="866">866</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This program is free software; you can redistribute it and/or modify it </td> </tr> <tr> <td class="h" > <a name="867">867</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> under the terms of either: the GNU General Public License as published </td> </tr> <tr> <td class="h" > <a name="868">868</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> by the Free Software Foundation; or the Artistic License. </td> </tr> <tr> <td class="h" > <a name="869">869</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="870">870</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> See L<http://dev.perl.org/licenses/> for more information. </td> </tr> <tr> <td class="h" > <a name="871">871</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="872">872</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="873">873</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="874">874</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="875">875</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 1; # End of Text::Amuse::Compile </td> </tr> </table> </body> </html>