@@ -29,7 +29,8 @@ my $scriptnumber = 0;
29
29
# }}}1
30
30
# Loading =============================================================== {{{1
31
31
32
- # Load the named script file from disk, but do not execute it
32
+ # Load the named script file from disk, but do not execute it.
33
+ # TODO permit specifying an Ln?
33
34
# @param $self
34
35
# @param $fn {String} Filename to load
35
36
sub load_script_file {
@@ -51,6 +52,7 @@ sub load_script_file {
51
52
} # load_script_file
52
53
53
54
# Load the given text, but do not execute it.
55
+ # TODO permit specifying a specific Ln?
54
56
# @param $self
55
57
# @param $text {String} The source text, **which load_script_text may modify.**
56
58
# @param $fn {String} Filename to use in debugging messages
@@ -116,6 +118,7 @@ files.
116
118
\b\h *;? # permit trailers for ergonomics
117
119
} mx ;
118
120
121
+ # Split the file into individual Ln blocks
119
122
while ( $text =~ m /$RE_Ln / g ) {
120
123
my @idxes =($- [0], $+ [0]);
121
124
my $lang = $1 ;
@@ -144,7 +147,7 @@ files.
144
147
$length_delta -= length ($removed );
145
148
146
149
my $replacement = ' ' ;
147
- $has_lang = 1 ;
150
+ $has_lang = true ;
148
151
149
152
# End an existing capture if we're switching languages
150
153
if ($curr_trailer ) {
@@ -186,7 +189,7 @@ files.
186
189
# say "pos = $oldpos; Delta pos = $length_delta";
187
190
pos ($text ) = $oldpos + $length_delta ;
188
191
}
189
- } # foreach lang
192
+ } # foreach Ln block
190
193
191
194
$text .= " \n " unless substr ($text , length ($text )-1) eq " \n " ;
192
195
$text .= " $curr_trailer \n " if $curr_trailer ;
@@ -478,14 +481,6 @@ Constructor. Takes a hash ref of options
478
481
479
482
Christopher White, C<cxwembedded at gmail.com >
480
483
481
- =head1 BUGS
482
-
483
- Please report any bugs or feature requests to C<bug-xml-axk at rt.cpan.org > , or
484
- through the web interface at
485
- L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-Axk> . I will be notified,
486
- and then you'll automatically be notified of progress on your bug as I make
487
- changes.
488
-
489
484
=head1 SUPPORT
490
485
491
486
You can find documentation for this module with the perldoc command.
@@ -504,19 +499,13 @@ L<https://github.com/cxw42/axk>
504
499
505
500
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-Axk>
506
501
507
- =item * AnnoCPAN: Annotated CPAN documentation
508
-
509
- L<http://annocpan.org/dist/XML-Axk>
510
-
511
- =item * CPAN Ratings
512
-
513
- L<http://cpanratings.perl.org/d/XML-Axk>
514
-
515
- =item * Search CPAN
502
+ =back
516
503
517
- L<http://search.cpan.org/dist/XML-Axk/>
504
+ =head1 NOTE
518
505
519
- =back
506
+ I just recently found out about L<Web::Scraper> , which has some overlapping
507
+ functionality. However, XML::Axk is targeted specifically at XML, rather
508
+ than HTML, and should eventually support dedicated, non-Perl script languages.
520
509
521
510
=head1 LICENSE AND COPYRIGHT
522
511
0 commit comments