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   2134616 use strict;
  57         450  
  57         1618  
4 57     57   255 use warnings FATAL => 'all';
  57         94  
  57         2835  
5              
6             use constant {
7             DEBUG => $ENV{AMW_DEBUG},
8 57     57   327 };
  57         126  
  57         4964  
9              
10 57     57   369 use File::Basename;
  57         91  
  57         5769  
11 57     57   29100 use File::Temp;
  57         855839  
  57         3574  
12 57     57   373 use File::Find;
  57         101  
  57         2524  
13 57     57   298 use File::Spec;
  57         96  
  57         1297  
14              
15 57     57   20519 use Text::Amuse::Functions qw/muse_fast_scan_header/;
  57         1994887  
  57         4015  
16 57     57   29197 use Text::Amuse::Compile::File;
  57         179  
  57         2080  
17 57     57   25289 use Text::Amuse::Compile::Merged;
  57         165  
  57         1779  
18 57     57   408 use Text::Amuse::Compile::MuseHeader;
  57         134  
  57         1260  
19 57     57   21546 use Text::Amuse::Compile::FileName;
  57         142  
  57         1675  
20 57     57   376 use Text::Amuse::Compile::Fonts;
  57         126  
  57         1040  
21 57     57   21535 use Text::Amuse::Compile::Fonts::Selected;
  57         168  
  57         4781  
22              
23 57     57   405 use Cwd;
  57         102  
  57         5584  
24 57     57   483 use Fcntl qw/:flock/;
  57         108  
  57         7175  
25 57     57   333 use Moo;
  57         103  
  57         261  
26 57     57   18198 use Types::Standard qw/Int Maybe Bool Str HashRef CodeRef Object ArrayRef InstanceOf/;
  57         113  
  57         410  
27              
28             =head1 NAME
29              
30             Text::Amuse::Compile - Compiler for Text::Amuse
31              
32             =head1 VERSION
33              
34             Version 1.86
35              
36             =cut
37              
38             our $VERSION = '1.86';
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   12014 my $self = shift;
244 224         777 my $specs = $self->fontspec;
245 224         4241 my $fonts = Text::Amuse::Compile::Fonts->new($specs);
246 222   100     31992 my %args = (
247             size => $self->selected_font_size || 10,
248             all_fonts => $fonts,
249             );
250 222         1309 my @all_fonts = $fonts->all_fonts;
251 222         815 foreach my $type (qw/sans mono serif/) {
252 664         1640 my $method = $type . '_fonts';
253 664         3733 my @all = $fonts->$method;
254 664 100       1961 die "Missing $type font in the specification" unless @all;
255 663 100       1782 my $store = $type eq 'serif' ? 'main' : $type;
256 663         1311 my $smethod = "selected_font_${store}";
257 663 100       2739 if (my $selected = $self->$smethod) {
258 44         88 my ($got) = grep { $_->name eq $selected } @all_fonts;
  1149         1665  
259 44         129 $args{$store} = $got;
260             }
261 663 100       1597 unless ($args{$store}) {
262 621         12565 $self->logger->("$store font not found, using the default\n");
263 621         6763 $args{$store} = $all[0]; # if everything fails
264             }
265             }
266 221         6420 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 1694285 my ($class, %params) = @_;
285 245 100       675 $params{extra_opts} = { %{ delete $params{extra} || {} } };
  245         2023  
286 245         788 my $all = 1;
287 245 100       1079 if (exists $params{slides}) {
288 15         39 my $slides = delete $params{slides};
289 15   100     66 $params{sl_pdf} ||= $slides;
290             }
291 245         1208 foreach my $format ($class->available_methods) {
292 1249 100       2617 if (exists $params{$format}) {
293 235         473 $all = 0;
294 235         557 last;
295             }
296             }
297 245 100       1071 if ($all) {
298 10         30 foreach my $format ($class->available_methods) {
299 100         165 $params{$format} = 1;
300             }
301             }
302 245         629 foreach my $dir (qw/ttdir/) {
303 245 50 66     1354 if (exists $params{$dir} and defined $params{$dir} and -d $params{$dir}) {
      66        
304 1         27 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         737 foreach my $type (qw/main sans mono/) {
310 735         2430 $params{"selected_font_$type"} = delete $params{extra_opts}{"${type}font"};
311             }
312 245         737 $params{selected_font_size} = delete $params{extra_opts}{fontsize};
313 245         4319 return \%params;
314             }
315              
316             sub available_methods {
317 573     573 1 2555 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 871 my $self = shift;
331 318         1013 return grep { $self->$_ } $self->available_methods;
  3180         8037  
332             }
333              
334              
335              
336             sub extra {
337 300     300 1 2602 return %{ shift->extra_opts };
  300         14215  
338             }
339              
340              
341             sub _build_standalone {
342 218     218   6214 my $self = shift;
343 218 100 66     1766 if ($self->a4_pdf || $self->lt_pdf) {
344 2         30 return 0;
345             }
346             else {
347 216         3023 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 2812 my ($self, $dir) = @_;
424 5         8 my @files;
425 5 50 33     80 die "$dir is not a dir" unless ($dir && -d $dir);
426             find( sub {
427 80     80   200 my $file = $_;
428             # file only
429 80 100       3140 return unless -f $file;
430 40 100       575 return unless $file =~ m/^[0-9a-z][0-9a-z-]+[0-9a-z]+\.muse$/;
431             # exclude hidden directories
432 20 100       58 if ($File::Find::dir =~ m/\./) {
433 8         59 my @dirs = File::Spec->splitdir($File::Find::dir);
434              
435             # for the purpose of filtering, the leading . is harmless
436 8 100 33     45 if (@dirs && $dirs[0] && $dirs[0] eq '.') {
      66        
437 4         13 shift(@dirs);
438             }
439              
440 8         20 my @dots = grep { m/^\./ } @dirs;
  24         56  
441 8 100       165 return if @dots;
442             }
443 15         604 push @files, File::Spec->rel2abs($file);
444 5         326 }, $dir);
445 5         61 return sort @files;
446             }
447              
448             sub find_new_muse_files {
449 4     4 1 5033 my ($self, $dir) = @_;
450 4         12 my @candidates = $self->find_muse_files($dir);
451 4         6 my @newf;
452 4         9 my $mtime = 9;
453 4         10 while (@candidates) {
454 12         27 my $f = shift(@candidates);
455 12 50 33     154 die "I was expecting a file here" unless $f && -f $f;
456 12         29 my $status = $f;
457 12         60 $status =~ s/\.muse$/.status/;
458 12 100       244 if (! -f $status) {
    50          
459 7         26 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 1601 my ($self, $dir) = @_;
470 2         6 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 > 216274 </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 > 1492 </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 > 11757 </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 > 897 </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 > 872 </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 > 4220 </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 > 1344 </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 > 39 </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 > 129 </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 > 630 </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 > 1361 </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 > 1359 </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 > 5648 </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 > 1530 </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 > 75 </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 > 38 </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 > 61 </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 > 1555 </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 > 1928 </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 > 73 </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 > 76 </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 > 119 </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 > 50 </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 > 121 </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 > 42 </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 > 327 </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 > 156 </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 > 103 </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 > 64 </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 > 492 </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 > 98 </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 > 248 </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 > 55 </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 > 219 </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 > 198 </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 > 8654 </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 > 1377 </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 > 900 </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 > 3559 </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 > 2217 </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 > 1506 </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 > 2599 </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 > 1271 </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 > 8744 </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 > 3862 </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 > 173047 </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 > 7168 </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 > 8315 </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 > 1401 </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 > 12170 </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 > 2624 </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 > 1728 </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 > 4019 </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 > 1341 </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 > 5 </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 > 15367 </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 > 26045 </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 > 937 </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 > 1581 </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 > 40267 </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 > 154 </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 > 149 </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 > 49494 </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 > 5000990 </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 > 864 </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 > 2019 </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 > 8681 </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 > 64 </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 > 38 </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 > 18769 </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 > 3117 </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 > 298 </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 > 449 </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 > 35 </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 > 1582 </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 > 325 </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 > 4033 </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 > 2854 </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 > 80734 </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 > 5 </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 > 18266 </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 > 6608 </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 > 7 </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 > 171 </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 > 1876 </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 > 2873 </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 > 109034 </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 > 54 </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 > 63 </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 > 45 </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 > 74 </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 > 63 </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 > 64 </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 > 162 </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 > 91 </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 > 358 </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 > 434 </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 > 273 </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 > 4958 </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 > 34 </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 > 26 </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 > 45 </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 > 53 </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 > 1909 </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 > 58 </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 > 48 </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 > 72 </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 > 447 </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 > 27 </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 > 34 </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 > 13 </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 > 9 </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 > 10 </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 > 301 </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 > 2293 </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 > 41 </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 > 42 </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 > 98 </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 > 738 </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 > 552 </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 > 3489 </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 > 127 </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 > 322 </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 > 11 </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 > 21 </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 > 837 </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 > 7551 </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>