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 58     58   2482112 use strict;
  58         589  
  58         1853  
4 58     58   319 use warnings FATAL => 'all';
  58         121  
  58         3352  
5              
6             use constant {
7             DEBUG => $ENV{AMW_DEBUG},
8 58     58   355 };
  58         143  
  58         5784  
9              
10 58     58   414 use File::Basename;
  58         110  
  58         6667  
11 58     58   34173 use File::Temp;
  58         997711  
  58         4089  
12 58     58   478 use File::Find;
  58         118  
  58         3110  
13 58     58   371 use File::Spec;
  58         115  
  58         1576  
14              
15 58     58   24229 use Text::Amuse::Functions qw/muse_fast_scan_header/;
  58         2356620  
  58         4582  
16 58     58   34645 use Text::Amuse::Compile::File;
  58         226  
  58         2392  
17 58     58   28505 use Text::Amuse::Compile::Merged;
  58         192  
  58         1998  
18 58     58   469 use Text::Amuse::Compile::MuseHeader;
  58         171  
  58         1339  
19 58     58   23883 use Text::Amuse::Compile::FileName;
  58         198  
  58         2009  
20 58     58   460 use Text::Amuse::Compile::Fonts;
  58         167  
  58         1285  
21 58     58   25615 use Text::Amuse::Compile::Fonts::Selected;
  58         3458  
  58         2122  
22              
23 58     58   421 use Cwd;
  58         2587  
  58         4651  
24 58     58   412 use Fcntl qw/:flock/;
  58         119  
  58         7951  
25 58     58   385 use Moo;
  58         146  
  58         317  
26 58     58   21146 use Types::Standard qw/Int Maybe Bool Str HashRef CodeRef Object ArrayRef InstanceOf/;
  58         138  
  58         415  
27              
28             =head1 NAME
29              
30             Text::Amuse::Compile - Compiler for Text::Amuse
31              
32             =head1 VERSION
33              
34             Version 1.88
35              
36             =cut
37              
38             our $VERSION = '1.88';
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 226     226   14144 my $self = shift;
244 226         943 my $specs = $self->fontspec;
245 226         4960 my $fonts = Text::Amuse::Compile::Fonts->new($specs);
246 224   100     38293 my %args = (
247             size => $self->selected_font_size || 10,
248             all_fonts => $fonts,
249             luatex => $self->luatex,
250             );
251 224         1510 my @all_fonts = $fonts->all_fonts;
252 224         978 foreach my $type (qw/sans mono serif/) {
253 670         1938 my $method = $type . '_fonts';
254 670         4347 my @all = $fonts->$method;
255 670 100       2351 die "Missing $type font in the specification" unless @all;
256 669 100       2267 my $store = $type eq 'serif' ? 'main' : $type;
257 669         1624 my $smethod = "selected_font_${store}";
258 669 100       3373 if (my $selected = $self->$smethod) {
259 46         113 my ($got) = grep { $_->name eq $selected } @all_fonts;
  1251         2192  
260 46         149 $args{$store} = $got;
261             }
262 669 100       1929 unless ($args{$store}) {
263 625         14499 $self->logger->("$store font not found, using the default\n");
264 625         7615 $args{$store} = $all[0]; # if everything fails
265             }
266             }
267 223         7195 return Text::Amuse::Compile::Fonts::Selected->new(%args);
268             }
269              
270             has selected_font_main => (is => 'ro', isa => Maybe[Str]);
271             has selected_font_sans => (is => 'ro', isa => Maybe[Str]);
272             has selected_font_mono => (is => 'ro', isa => Maybe[Str]);
273             has selected_font_size => (is => 'ro', isa => Maybe[Int]);
274              
275             has standalone => (is => 'lazy', isa => Bool);
276             has extra_opts => (is => 'ro', isa => HashRef, default => sub { +{} });
277              
278             sub slides {
279 0     0 1 0 return shift->sl_pdf;
280             }
281              
282             has coverpage_only_if_toc => (is => 'ro', isa => Bool, default => sub { 0 });
283              
284             sub BUILDARGS {
285 247     247 1 1951782 my ($class, %params) = @_;
286 247 100       796 $params{extra_opts} = { %{ delete $params{extra} || {} } };
  247         2406  
287 247         1008 my $all = 1;
288 247 100       1231 if (exists $params{slides}) {
289 15         36 my $slides = delete $params{slides};
290 15   100     62 $params{sl_pdf} ||= $slides;
291             }
292 247         1283 foreach my $format ($class->available_methods) {
293 1261 100       3160 if (exists $params{$format}) {
294 237         675 $all = 0;
295 237         705 last;
296             }
297             }
298 247 100       1221 if ($all) {
299 10         42 foreach my $format ($class->available_methods) {
300 100         190 $params{$format} = 1;
301             }
302             }
303 247         794 foreach my $dir (qw/ttdir/) {
304 247 50 66     1489 if (exists $params{$dir} and defined $params{$dir} and -d $params{$dir}) {
      66        
305 1         21 my $abs = File::Spec->rel2abs($params{$dir});
306 1         4 $params{$dir} = $abs;
307             }
308             }
309             # take out the fonts from the extra, for backcomp.
310 247         875 foreach my $type (qw/main sans mono/) {
311 741         2800 $params{"selected_font_$type"} = delete $params{extra_opts}{"${type}font"};
312             }
313 247         950 $params{selected_font_size} = delete $params{extra_opts}{fontsize};
314 247         5311 return \%params;
315             }
316              
317             sub available_methods {
318 579     579 1 2837 return (qw/bare_html
319             html
320             epub
321             a4_pdf
322             lt_pdf
323             tex
324             zip
325             pdf
326             sl_tex
327             sl_pdf
328             /);
329             }
330             sub compile_methods {
331 322     322 1 996 my $self = shift;
332 322         1113 return grep { $self->$_ } $self->available_methods;
  3220         9365  
333             }
334              
335              
336              
337             sub extra {
338 304     304 1 2969 return %{ shift->extra_opts };
  304         9287  
339             }
340              
341              
342             sub _build_standalone {
343 220     220   7933 my $self = shift;
344 220 100 66     2050 if ($self->a4_pdf || $self->lt_pdf) {
345 2         35 return 0;
346             }
347             else {
348 218         3925 return 1;
349             }
350             }
351              
352             has logger => (is => 'rw',
353             isa => CodeRef,
354             default => sub { return sub { print @_ }; });
355              
356             has report_failure_sub => (is => 'rw',
357             isa => CodeRef,
358             default => sub {
359             return sub {
360             print "Failure to compile $_[0]\n";
361             }
362             });
363             has errors => (is => 'rwp', isa => ArrayRef, default => sub { [] });
364              
365              
366             =head2 BUILDARGS routine
367              
368             The C key is passed instead to C. Directories are
369             made absolute. If no formats are required explicitely, set them all to
370             true.
371              
372             =cut
373              
374             =head2 METHODS
375              
376             =head3 fonts
377              
378             The L object, constructed from
379             the fontspec argument and eventual C font keys passed.
380              
381             =head3 version
382              
383             Report version information
384              
385             =cut
386              
387             sub version {
388 0     0 1 0 my $self = shift;
389 0         0 my $musev = $Text::Amuse::VERSION;
390 0         0 my $selfv = $VERSION;
391 0         0 my $pdfv = $PDF::Imposition::VERSION;
392 0         0 return "Using Text::Amuse $musev, Text::Amuse::Compiler $selfv, " .
393             "PDF::Imposition $pdfv\n";
394             }
395              
396             =head3 logger($sub)
397              
398             Accessor/setter for the subroutine which will handle the logging.
399             Defaults to printing to the standard output.
400              
401             =head3 recursive_compile($directory)
402              
403             Compile recursive a directory, comparing the timestamps of the status
404             file with the muse file. If the status file is newer, the file is
405             ignored.
406              
407             Return a list of absolute path to the files processed. To infer the
408             success or the failure of each file look at the status file or at the
409             logs.
410              
411             =head3 find_muse_files($directory)
412              
413             Return a sorted list of files with extension .muse excluding illegal
414             names (including hidden files and directories).
415              
416             =head3 find_new_muse_files($directory)
417              
418             As above, but check the age of the status file and skip already
419             processed files.
420              
421             =cut
422              
423             sub find_muse_files {
424 5     5 1 3222 my ($self, $dir) = @_;
425 5         10 my @files;
426 5 50 33     96 die "$dir is not a dir" unless ($dir && -d $dir);
427             find( sub {
428 80     80   285 my $file = $_;
429             # file only
430 80 100       3597 return unless -f $file;
431 40 100       689 return unless $file =~ m/^[0-9a-z][0-9a-z-]+[0-9a-z]+\.muse$/;
432             # exclude hidden directories
433 20 100       75 if ($File::Find::dir =~ m/\./) {
434 8         66 my @dirs = File::Spec->splitdir($File::Find::dir);
435              
436             # for the purpose of filtering, the leading . is harmless
437 8 100 33     55 if (@dirs && $dirs[0] && $dirs[0] eq '.') {
      66        
438 4         9 shift(@dirs);
439             }
440              
441 8         23 my @dots = grep { m/^\./ } @dirs;
  24         68  
442 8 100       150 return if @dots;
443             }
444 15         712 push @files, File::Spec->rel2abs($file);
445 5         367 }, $dir);
446 5         69 return sort @files;
447             }
448              
449             sub find_new_muse_files {
450 4     4 1 5630 my ($self, $dir) = @_;
451 4         15 my @candidates = $self->find_muse_files($dir);
452 4         9 my @newf;
453 4         9 my $mtime = 9;
454 4         12 while (@candidates) {
455 12         30 my $f = shift(@candidates);
456 12 50 33     181 die "I was expecting a file here" unless $f && -f $f;
457 12         34 my $status = $f;
458 12         67 $status =~ s/\.muse$/.status/;
459 12 100       271 if (! -f $status) {
    50          
460 7         32 push @newf, $f;
461             }
462             elsif ((stat($f))[$mtime] > (stat($status))[$mtime]) {
463 0         0 push @newf, $f;
464             }
465             }
466 4         26 return @newf;
467             }
468              
469             sub recursive_compile {
470 2     2 1 1977 my ($self, $dir) = @_;
471 2         7 return $self->compile($self->find_new_muse_files($dir));
472             }
473              
474              
475             =head3 compile($file1, $file2, ...);
476              
477             Main method to get the job done, passing the list of muse files. You
478             can inspect the errors calling C. It does produce some output.
479              
480             The file may also be an hash reference. In this case, the compile will
481             act on a list of files and will merge them. Beware that so far only
482             the C and C options will work, while the other html methods
483             will throw exceptions or (worse probably) produce empty files. This
484             will be fixed soon. This feature is marked as B and
485             could change in the future.
486              
487             =head4 virtual file hashref
488              
489             The hash reference should have those mandatory fields:
490              
491             =over 4
492              
493             =item files
494              
495             An B of filenames without extension.
496              
497             =item path
498              
499             A mandatory directory where to find the above files.
500              
501             =back
502              
503             Optional keys
504              
505             =over 4
506              
507             =item name
508              
509             Default to virtual. This is the basename of the files which will be
510             produced. It's up to you to provide a sensible name we don't do any
511             check on that.
512              
513             =item suffix
514              
515             Defaults to '.muse' and you have no reason to change this.
516              
517             =back
518              
519             Every other key is the metadata of the new document, so usually you
520             want to set C and optionally C<author>. </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">   </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"> Example: </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">   </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"> $c->compile({ </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"> # mandatory </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"> path => File::Spec->catdir(qw/t merged-dir/), </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"> files => [qw/first second/], </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">   </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"> # recommended </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"> name => 'my-new-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"> title => 'My new shiny test', </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">   </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"> # optional </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"> subtitle => 'Another one', </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"> date => 'Today!', </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"> source => 'Text::Amuse::Compile', </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">   </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"> You can pass as many hashref you want. </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">   </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"> =cut </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">   </td> </tr> <tr> <td class="h" > <a name="543">543</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="544">544</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#544-1"> 299 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#544-1"> 1 </a> </td> <td > 361622 </td> <td class="s"> my ($self, @files) = @_; </td> </tr> <tr> <td class="h" > <a name="545">545</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1670 </td> <td class="s"> $self->reset_errors; </td> </tr> <tr> <td class="h" > <a name="546">546</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 13240 </td> <td class="s"> my $cwd = getcwd; </td> </tr> <tr> <td class="h" > <a name="547">547</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1124 </td> <td class="s"> my @compiled; </td> </tr> <tr> <td class="h" > <a name="548">548</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1063 </td> <td class="s"> foreach my $file (@files) { </td> </tr> <tr> <td class="h" > <a name="549">549</a> </td> <td class="c3" > 301 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#549-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 4320 </td> <td class="s"> chdir $cwd or die "Couldn't chdir into $cwd $!"; </td> </tr> <tr> <td class="h" > <a name="550">550</a> </td> <td class="c3" > 301 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#550-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1557 </td> <td class="s"> if (ref($file)) { </td> </tr> <tr> <td class="h" > <a name="551">551</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 > 80 </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"> } </td> </tr> <tr> <td class="h" > <a name="553">553</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="554">554</a> </td> <td class="c3" > 285 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 714 </td> <td class="s"> eval { $self->_compile_file($file); }; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 285 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1440 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="555">555</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="556">556</a> </td> <td class="c3" > 301 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1678 </td> <td class="s"> my $fatal = $@; </td> </tr> <tr> <td class="h" > <a name="557">557</a> </td> <td class="c3" > 301 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#557-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 6172 </td> <td class="s"> chdir $cwd or die "Couldn't chdir into $cwd $!"; </td> </tr> <tr> <td class="h" > <a name="558">558</a> </td> <td class="c3" > 301 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#558-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1764 </td> <td class="s"> if ($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 > 89 </td> <td class="s"> $self->logger->($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 > 46 </td> <td class="s"> $self->add_errors("$file $fatal"); </td> </tr> <tr> <td class="h" > <a name="561">561</a> </td> <td class="c3" > 3 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 70 </td> <td class="s"> $self->report_failure_sub->($file); </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"> } </td> </tr> <tr> <td class="h" > <a name="563">563</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="564">564</a> </td> <td class="c3" > 298 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1865 </td> <td class="s"> push @compiled, $file; </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 >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="567">567</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2222 </td> <td class="s"> return @compiled; </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">   </td> </tr> <tr> <td class="h" > <a name="570">570</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="571">571</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#571-1"> 16 </a> </td> <td >   </td> <td > 57 </td> <td class="s"> my ($self, $vfile) = @_; </td> </tr> <tr> <td class="h" > <a name="572">572</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="573">573</a> </td> <td class="c3" > 16 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#573-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="574">574</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 127 </td> <td class="s"> my %virtual = %$vfile; </td> </tr> <tr> <td class="h" > <a name="575">575</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 60 </td> <td class="s"> my $files = delete $virtual{files}; </td> </tr> <tr> <td class="h" > <a name="576">576</a> </td> <td class="c3" > 16 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#576-1"> 50 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#576-1"> 33 </a> </td> <td >   </td> <td >   </td> <td > 122 </td> <td class="s"> die "No file list found" unless $files && @$files; </td> </tr> <tr> <td class="h" > <a name="577">577</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 57 </td> <td class="s"> my $path = delete $virtual{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 class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#578-1"> 33 </a> </td> <td >   </td> <td >   </td> <td > 316 </td> <td class="s"> die "No directory path" unless $path && -d $path; </td> </tr> <tr> <td class="h" > <a name="579">579</a> </td> <td class="c3" > 16 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#579-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 179 </td> <td class="s"> chdir $path or die "Couldn't chdir into $path $!"; </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 > 121 </td> <td class="s"> my $suffix = delete($virtual{suffix}) || '.muse'; </td> </tr> <tr> <td class="h" > <a name="581">581</a> </td> <td class="c3" > 16 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#581-1"> 50 </a> </td> <td >   </td> <td >   </td> <td > 69 </td> <td class="s"> my $name = delete($virtual{name}) || 'virtual'; </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 > 568 </td> <td class="s"> $self->logger->("Working on virtual file in " . getcwd(). "\n"); </td> </tr> <tr> <td class="h" > <a name="583">583</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 114 </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 > 280 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="584">584</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="585">585</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 69 </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 > 230 </td> <td class="s">   </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"> %virtual); </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"> my $muse = Text::Amuse::Compile::File->new( </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"> name => $name, </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"> suffix => $suffix, </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"> luatex => $self->luatex, </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"> ttdir => $self->ttdir, </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"> options => { $self->extra }, </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"> document => $doc, </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"> logger => $self->logger, </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"> virtual => 1, </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"> standalone => $self->standalone, </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"> fonts => $self->fonts, </td> </tr> <tr> <td class="h" > <a name="598">598</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="599">599</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 224 </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 > 12148 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="600">600</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="601">601</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1620 </td> <td class="s"> $self->_muse_compile($muse); </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">   </td> </tr> <tr> <td class="h" > <a name="605">605</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="606">606</a> </td> <td class="c3" > 285 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#606-1"> 285 </a> </td> <td >   </td> <td > 1252 </td> <td class="s"> my ($self, $file) = @_; </td> </tr> <tr> <td class="h" > <a name="607">607</a> </td> <td class="c3" > 285 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3346 </td> <td class="s"> my $fileobj = Text::Amuse::Compile::FileName->new($file); </td> </tr> <tr> <td class="h" > <a name="608">608</a> </td> <td class="c3" > 285 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#608-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#608-1"> 66 </a> </td> <td >   </td> <td >   </td> <td > 2951 </td> <td class="s"> die "$file is not a file" unless $fileobj && -f $fileobj->full_path; </td> </tr> <tr> <td class="h" > <a name="609">609</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="610">610</a> </td> <td class="c3" > 284 </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 > 1742 </td> <td class="s"> if (my $path = $fileobj->path) { </td> </tr> <tr> <td class="h" > <a name="611">611</a> </td> <td class="c3" > 284 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#611-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 3137 </td> <td class="s"> chdir $path or die "Cannot chdir into $path from " . getcwd() . "\n" ; </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 >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="614">614</a> </td> <td class="c3" > 284 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1594 </td> <td class="s"> my $filename = $fileobj->filename; </td> </tr> <tr> <td class="h" > <a name="615">615</a> </td> <td class="c3" > 284 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 10258 </td> <td class="s"> $self->logger->("Working on $filename file in " . getcwd(). "\n"); </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">   </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"> my %args = ( </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"> name => $fileobj->name, </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"> suffix => $fileobj->suffix, </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"> ttdir => $self->ttdir, </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"> options => { $self->extra }, </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"> logger => $self->logger, </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"> standalone => $self->standalone, </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"> fonts => $self->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"> epub_embed_fonts => $self->epub_embed_fonts, </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"> luatex => $self->luatex, </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"> fileobj => $fileobj, </td> </tr> <tr> <td class="h" > <a name="628">628</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="629">629</a> </td> <td class="c3" > 284 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 5102 </td> <td class="s"> include_paths => [ @{$self->include_paths} ], </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 283 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 226689 </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 >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="632">632</a> </td> <td class="c3" > 283 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 7743 </td> <td class="s"> my $muse = Text::Amuse::Compile::File->new(%args); </td> </tr> <tr> <td class="h" > <a name="633">633</a> </td> <td class="c3" > 283 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 9893 </td> <td class="s"> $self->_muse_compile($muse); </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">   </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"> # write the status file and unlock it after that. </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">   </td> </tr> <tr> <td class="h" > <a name="638">638</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="639">639</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#639-1"> 299 </a> </td> <td >   </td> <td > 1490 </td> <td class="s"> my ($self, $fh, $status, @diagnostics) = @_; </td> </tr> <tr> <td class="h" > <a name="640">640</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 12619 </td> <td class="s"> my $localtime = localtime(); </td> </tr> <tr> <td class="h" > <a name="641">641</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2970 </td> <td class="s"> my %avail = ( </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"> FAILED => 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"> DELETED => 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"> OK => 1, </td> </tr> <tr> <td class="h" > <a name="645">645</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="646">646</a> </td> <td class="c3" > 299 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#646-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1882 </td> <td class="s"> die unless $avail{$status}; </td> </tr> <tr> <td class="h" > <a name="647">647</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4843 </td> <td class="s"> print $fh "$status $$ $localtime\n"; </td> </tr> <tr> <td class="h" > <a name="648">648</a> </td> <td class="c3" > 299 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#648-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 1632 </td> <td class="s"> if (@diagnostics) { </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"> print $fh "\n"; </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 > 3 </td> <td class="s"> foreach my $diag (@diagnostics) { </td> </tr> <tr> <td class="h" > <a name="651">651</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 14 </td> <td class="s"> print $fh "$diag\n"; </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 >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="654">654</a> </td> <td class="c3" > 299 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#654-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 14496 </td> <td class="s"> flock($fh, LOCK_UN) or die "Cannot unlock status file\n"; </td> </tr> <tr> <td class="h" > <a name="655">655</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 12127 </td> <td class="s"> close $fh; </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">   </td> </tr> <tr> <td class="h" > <a name="658">658</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="659">659</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#659-1"> 299 </a> </td> <td >   </td> <td > 1043 </td> <td class="s"> my ($self, $muse) = @_; </td> </tr> <tr> <td class="h" > <a name="660">660</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1784 </td> <td class="s"> my $statusfile = $muse->status_file; </td> </tr> <tr> <td class="h" > <a name="661">661</a> </td> <td class="c3" > 299 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#661-1"> 50 </a> </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#661-1"> 20 </a> </td> <td >   </td> <td > 25408 </td> <td class="s"> open (my $fhlock, '>:encoding(utf-8)', $statusfile) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 20 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 177 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 20 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 48 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 20 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 169 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="662">662</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="663">663</a> </td> <td class="c3" > 299 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#663-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 55565 </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="664">664</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="665">665</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 5001145 </td> <td class="s"> sleep 5 if DEBUG; </td> </tr> <tr> <td class="h" > <a name="666">666</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="667">667</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1025 </td> <td class="s"> my @fatals; </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"> my @warnings; </td> </tr> <tr> <td class="h" > <a name="669">669</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="670">670</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2235 </td> <td class="s"> $muse->purge_all unless DEBUG; </td> </tr> <tr> <td class="h" > <a name="671">671</a> </td> <td class="c3" > 299 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#671-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 10154 </td> <td class="s"> if ($muse->is_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 > 72 </td> <td class="s"> $self->_write_status_file($fhlock, 'DELETED'); </td> </tr> <tr> <td class="h" > <a name="673">673</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 29 </td> <td class="s"> return; </td> </tr> <tr> <td class="h" > <a name="674">674</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="675">675</a> </td> <td class="c3" > 298 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 22772 </td> <td class="s"> foreach my $method ($self->compile_methods) { </td> </tr> <tr> <td class="h" > <a name="676">676</a> </td> <td class="c3" > 438 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#676-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#676-1"> 66 </a> </td> <td >   </td> <td >   </td> <td > 3785 </td> <td class="s"> if ($method eq 'sl_pdf' or $method eq 'sl_tex') { </td> </tr> <tr> <td class="h" > <a name="677">677</a> </td> <td class="c3" > 16 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#677-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 343 </td> <td class="s"> unless ($muse->wants_slides) { </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 > 492 </td> <td class="s"> $self->logger->("* Slides not required\n"); </td> </tr> <tr> <td class="h" > <a name="679">679</a> </td> <td class="c3" > 7 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 38 </td> <td class="s"> next; </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 >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="682">682</a> </td> <td class="c3" > 431 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1625 </td> <td class="s"> my $output = eval { </td> </tr> <tr> <td class="h" > <a name="683">683</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="684">684</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#684-1"> 1 </a> </td> <td >   </td> <td > 409 </td> <td class="s"> push @warnings, @_; </td> </tr> <tr> <td class="h" > <a name="685">685</a> </td> <td class="c3" > 431 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4256 </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="686">686</a> </td> <td class="c3" > 431 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3199 </td> <td class="s"> $muse->$method </td> </tr> <tr> <td class="h" > <a name="687">687</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="688">688</a> </td> <td class="c3" > 431 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#688-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 101411 </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="689">689</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="690">690</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s"> last; </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"> } </td> </tr> <tr> <td class="h" > <a name="692">692</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="693">693</a> </td> <td class="c3" > 430 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 20655 </td> <td class="s"> $self->logger->("* Created $output\n"); </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"> } </td> </tr> <tr> <td class="h" > <a name="695">695</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="696">696</a> </td> <td class="c0" > <a href="#830"> 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="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 >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="699">699</a> </td> <td class="c3" > 298 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#699-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 7020 </td> <td class="s"> if (@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 > 7 </td> <td class="s"> $self->_write_status_file($fhlock, 'FAILED', @fatals); </td> </tr> <tr> <td class="h" > <a name="701">701</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 182 </td> <td class="s"> die join(" ", @fatals); </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"> } </td> </tr> <tr> <td class="h" > <a name="703">703</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="704">704</a> </td> <td class="c3" > 297 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1924 </td> <td class="s"> $self->_write_status_file($fhlock, 'OK'); </td> </tr> <tr> <td class="h" > <a name="705">705</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="706">706</a> </td> <td class="c3" > 297 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#706-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 3219 </td> <td class="s"> $muse->cleanup if $self->cleanup; </td> </tr> <tr> <td class="h" > <a name="707">707</a> </td> <td class="c3" > 297 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 124680 </td> <td class="s"> foreach my $warn (@warnings) { </td> </tr> <tr> <td class="h" > <a name="708">708</a> </td> <td class="c3" > 1 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#708-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 33 </td> <td class="s"> $self->logger->("Warning: $warn") if $warn; </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">   </td> </tr> <tr> <td class="h" > <a name="712">712</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="713">713</a> </td> <td class="c3" > 27 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#713-1"> 27 </a> </td> <td >   </td> <td > 66 </td> <td class="s"> my ($self, $method) = @_; </td> </tr> <tr> <td class="h" > <a name="714">714</a> </td> <td class="c3" > 27 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#714-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 68 </td> <td class="s"> return unless $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 > 46 </td> <td class="s"> my $ext = $method; </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 > 93 </td> <td class="s"> $ext =~ s/_/./g; </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 > 66 </td> <td class="s"> $ext = '.' . $ext; </td> </tr> <tr> <td class="h" > <a name="718">718</a> </td> <td class="c3" > 27 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 75 </td> <td class="s"> return $ext; </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">   </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"> =head3 file_needs_compilation </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">   </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"> Returns true if the file has already been compiled, false if some </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"> output file is missing or stale. </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">   </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"> =head3 parse_muse_header($file) </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">   </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"> Return a L<Text::Amuse::Compile::MuseHeader> object for the given </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"> file. </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">   </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"> =cut </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">   </td> </tr> <tr> <td class="h" > <a name="733">733</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="734">734</a> </td> <td class="c3" > 29 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#734-1"> 29 </a> </td> <td >   </td> <td > 61 </td> <td class="s"> my ($self, $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 > 170 </td> <td class="s"> my $fileobj = Text::Amuse::Compile::FileName->new($file); </td> </tr> <tr> <td class="h" > <a name="736">736</a> </td> <td class="c3" > 29 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 110 </td> <td class="s"> return File::Spec->catfile($fileobj->path, $fileobj->name); </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">   </td> </tr> <tr> <td class="h" > <a name="739">739</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="740">740</a> </td> <td class="c3" > 53 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#740-1"> 53 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#740-1"> 1 </a> </td> <td > 348 </td> <td class="s"> my ($self, $file) = @_; </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 > 364 </td> <td class="s"> my $path = Text::Amuse::Compile::FileName->new($file)->full_path; </td> </tr> <tr> <td class="h" > <a name="742">742</a> </td> <td class="c3" > 53 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 257 </td> <td class="s"> return Text::Amuse::Compile::MuseHeader->new(muse_fast_scan_header($path)); </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">   </td> </tr> <tr> <td class="h" > <a name="746">746</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="747">747</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#747-1"> 16 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#747-1"> 1 </a> </td> <td > 5820 </td> <td class="s"> my ($self, $file) = @_; </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 > 34 </td> <td class="s"> my $need = 0; </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 > 31 </td> <td class="s"> my $mtime = 9; </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 > 44 </td> <td class="s"> my $basename = $self->_check_file_basename($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 > 67 </td> <td class="s"> my $header = $self->parse_muse_header($file); </td> </tr> <tr> <td class="h" > <a name="752">752</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2346 </td> <td class="s"> foreach my $m ($self->compile_methods) { </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 > 94 </td> <td class="s"> my $outsuffix = $self->_suffix_for_method($m); </td> </tr> <tr> <td class="h" > <a name="754">754</a> </td> <td class="c3" > 22 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 58 </td> <td class="s"> my $outfile = $basename . $outsuffix; </td> </tr> <tr> <td class="h" > <a name="755">755</a> </td> <td class="c3" > 22 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#755-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#755-1"> 66 </a> </td> <td >   </td> <td >   </td> <td > 95 </td> <td class="s"> if ($m eq 'sl_tex' or $m eq 'sl_pdf') { </td> </tr> <tr> <td class="h" > <a name="756">756</a> </td> <td class="c3" > 11 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#756-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 241 </td> <td class="s"> next unless $header->wants_slides; </td> </tr> <tr> <td class="h" > <a name="757">757</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="758">758</a> </td> <td class="c3" > 15 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#758-1"> 100 </a> </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--condition.html#758-1"> 66 </a> </td> <td >   </td> <td >   </td> <td > 543 </td> <td class="s"> if (-f $outfile and (stat($outfile))[$mtime] >= (stat($file))[$mtime]) { </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 > 43 </td> <td class="s"> print "$outfile is OK\n" if DEBUG; </td> </tr> <tr> <td class="h" > <a name="760">760</a> </td> <td class="c3" > 11 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 39 </td> <td class="s"> next; </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"> } </td> </tr> <tr> <td class="h" > <a name="762">762</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="763">763</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="764">764</a> </td> <td class="c3" > 4 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 10 </td> <td class="s"> $need = 1; </td> </tr> <tr> <td class="h" > <a name="765">765</a> </td> <td class="c3" > 4 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 12 </td> <td class="s"> last; </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 >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="768">768</a> </td> <td class="c3" > 16 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 360 </td> <td class="s"> return $need; </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">   </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"> =head2 purge(@files) </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">   </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"> Remove all the files produced by the compilation of the files passed </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"> as arguments. </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">   </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"> =cut </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">   </td> </tr> <tr> <td class="h" > <a name="778">778</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="779">779</a> </td> <td class="c3" > 13 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#779-1"> 13 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#779-1"> 1 </a> </td> <td > 2696 </td> <td class="s"> my ($self, @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 > 40 </td> <td class="s"> foreach my $file (@files) { </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 > 39 </td> <td class="s"> my $basename = $self->_check_file_basename($file); </td> </tr> <tr> <td class="h" > <a name="782">782</a> </td> <td class="c3" > 13 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 100 </td> <td class="s"> foreach my $ext (Text::Amuse::Compile::File->purged_extensions) { </td> </tr> <tr> <td class="h" > <a name="783">783</a> </td> <td class="c3" > 351 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#783-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 917 </td> <td class="s"> die "?" if $ext eq '.muse'; </td> </tr> <tr> <td class="h" > <a name="784">784</a> </td> <td class="c3" > 351 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 677 </td> <td class="s"> my $produced = $basename . $ext; </td> </tr> <tr> <td class="h" > <a name="785">785</a> </td> <td class="c3" > 351 </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#785-1"> 100 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 4719 </td> <td class="s"> if (-f $produced) { </td> </tr> <tr> <td class="h" > <a name="786">786</a> </td> <td class="c3" > 5 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 152 </td> <td class="s"> $self->logger->("Purging $produced\n"); </td> </tr> <tr> <td class="h" > <a name="787">787</a> </td> <td class="c3" > 5 </td> <td class="c0" > <a href="blib-lib-Text-Amuse-Compile-pm--branch.html#787-1"> 50 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td > 342 </td> <td class="s"> unlink $produced or warn "Cannot unlink $produced $!"; </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">   </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"> =head3 report_failure_sub(sub { push @problems, $_[0] }); </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">   </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"> You can set the sub to be used to report problems using this accessor. </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"> It will receive as first argument the file which led to failure. </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">   </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"> The actual errors are logged by the C<logger> sub. </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">   </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"> =head3 errors </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">   </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"> Accessor to the catched errors. It returns a list of strings. </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">   </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"> =head3 add_errors($error1, $error2,...) </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">   </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"> Add an error. [Internal] </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">   </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"> =head3 reset_errors </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">   </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"> Reset the errors </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">   </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"> =head3 has_errors </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">   </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"> Return the number of errors (handy to use as a boolean). </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">   </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"> =cut </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">   </td> </tr> <tr> <td class="h" > <a name="819">819</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="820">820</a> </td> <td class="c3" > 3 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#820-1"> 3 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#820-1"> 1 </a> </td> <td > 13 </td> <td class="s"> my ($self, @args) = @_; </td> </tr> <tr> <td class="h" > <a name="821">821</a> </td> <td class="c3" > 3 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 8 </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 > 25 </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">   </td> </tr> <tr> <td class="h" > <a name="824">824</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="825">825</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#825-1"> 299 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#825-1"> 1 </a> </td> <td > 844 </td> <td class="s"> my $self = shift; </td> </tr> <tr> <td class="h" > <a name="826">826</a> </td> <td class="c3" > 299 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 8411 </td> <td class="s"> $self->_set_errors([]); </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">   </td> </tr> <tr> <td class="h" > <a name="829">829</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="830">830</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#830-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Text-Amuse-Compile-pm--subroutine.html#830-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="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">   </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"> =head1 TeX live packages needed. </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">   </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"> You need the xetex scheme plus the following packages: fontspec, </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"> polyglossia, pzdr, wrapfig, footmisc, ulem, microtype, zapfding. </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">   </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"> For the luatex options, same as above plus luatex (and the lualatex </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"> format), luatexbase, luaotfload. </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">   </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"> The luatex option could give better microtypography results but is </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"> slower (x4) and requires more memory (x2). </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">   </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"> =head1 INTERNAL CONSTANTS </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">   </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"> =head2 DEBUG </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">   </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"> Set from AMW_DEBUG environment. </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">   </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"> =head1 AUTHOR </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">   </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"> Marco Pessotto, C<< <melmothx at gmail.com> >> </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">   </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"> =head1 BUGS </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">   </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"> Please mail the author and provide a minimal example to add to the </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"> test suite. </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">   </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"> =head1 SUPPORT </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">   </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"> You can find documentation for this module with the perldoc command. </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">   </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"> perldoc Text::Amuse::Compile </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">   </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"> =head1 LICENSE </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">   </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"> This program is free software; you can redistribute it and/or modify it </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"> under the terms of either: the GNU General Public License as published </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"> by the Free Software Foundation; or the Artistic License. </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">   </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"> See L<http://dev.perl.org/licenses/> for more information. </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">   </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"> =cut </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">   </td> </tr> <tr> <td class="h" > <a name="876">876</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>