[PerlWikiBot] SF.net SVN: perlwikibot:[62] trunk/no-interwiki/prepare_noiw_list.pl
Status: Pre-Alpha
Brought to you by:
rotemliss
From: <am...@us...> - 2008-08-04 10:42:27
|
Revision: 62 http://perlwikibot.svn.sourceforge.net/perlwikibot/?rev=62&view=rev Author: amire80 Date: 2008-08-04 10:42:35 +0000 (Mon, 04 Aug 2008) Log Message: ----------- Mostly cosmetic documentation update. Modified Paths: -------------- trunk/no-interwiki/prepare_noiw_list.pl Modified: trunk/no-interwiki/prepare_noiw_list.pl =================================================================== --- trunk/no-interwiki/prepare_noiw_list.pl 2008-08-04 10:35:32 UTC (rev 61) +++ trunk/no-interwiki/prepare_noiw_list.pl 2008-08-04 10:42:35 UTC (rev 62) @@ -197,7 +197,9 @@ \Q$STRING{no_iw}\E # The string may have spaces }xmsi; -# XXX HACK Until i get a better regex for matching balancing {{}} ... +# A simplistic template just for testing. +# Quite possibly it is not needed anymore. +# Until i get a better regex for matching balancing {{}} ... $PATTERN{template} = qr{ \A # beginning of string \Q$MW_SYNTAX{start_tmpl}\E # {{ @@ -396,7 +398,7 @@ (${$page_text_ref} =~ $PATTERN{simple_no_iw_check}); # Does the page have interwiki links? - # XXX Actually checks only for English + # BIG XXX Actually checks only for English my $has_iw = has_interwiki($page); if ($has_iw) { @@ -570,11 +572,8 @@ foreach my $next_filter (@{$filter}) { - # XXX Matches anywhere in the template. - # It probably should match the template name. - # Also - it is case-insensitive which is very wrong - # but kinda useful. - if ($next_match =~ /\Q$next_filter/xmsi) { + # N.B. - case-insensitive. Wrong, but kinda useful. + if ($next_match =~ /\A\Q$next_filter/xmsi) { # N.B.: parse_template calls find_templates() recursively my $parsed_template = @@ -769,7 +768,7 @@ } } - # XXX Still very stupid, but getting better + # BIG XXX Still very stupid, but getting better if (defined $iw_links{en}) { return 'en'; } @@ -942,7 +941,7 @@ sub write_sorted_pages { my ($type_name, $type_tree_ref) = @_; - my $type_fn = make_type_fn($type_name); # XXX + my $type_fn = make_type_fn($type_name); my $section_counter = 0; my $page = q{}; @@ -963,7 +962,9 @@ if ($section_counter == $option{max_sections_per_page}) { write_page(\$page, \$type_fn, $file_number++); $section_counter = 0; - undef $page; # XXX Trying to free memory + + # N.B. Trying to free memory, not guaranteed + undef $page; $page = q{}; } elsif ($section_counter) { @@ -985,7 +986,9 @@ [ @all_links_in_letter[ $first_link .. $last_link ] ]); $page .= $links; } - undef @all_links_in_letter; # XXX Trying to free memory + + # N.B. Trying to free memory, not guaranteed + undef @all_links_in_letter; } # The page may be empty at this point This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |