$_ is not a copy, it is an alias to the original value.
Therefore modifying it will mess with original list... That's
not what we want most of the time.
Also, using map to s/// two variables does not look right. What
a stupid race to save one line of code.
Without this it throws warnings like 'Name "OddMuse::ScriptName" used only once'.
It is unclear whether these warnings make any sense. We will hide them for now.
moin-search.pl, phpwiki-search.pl and usemod-search.pl were moved into a
new directory, modules/near-links, because they help support search of
near sites. They act as proxies, parsing the HTML and returning a file
format Oddmuse can understand.
See http://oddmuse.org/wiki/Near_Links#Searching_Near_Sites for more
information.
We have just read-TFM and figured out that we can use \&Sub. This way it
passes "use strict" but produces a warning with "use warnings" (the
warning is "Subroutine package::Sub redefined at ...").
We can "fix" it with "no warnings 'redefine'"
All the banning modules have a problem. They use code like the
following:
*StrangeOldBannedContent = *BannedContent;
*BannedContent = *StrangeNewBannedContent;
The code above changes both the sub and the variable. $BannedContent now
points to $StrangeNewBannedContent (which is undefined) and the name of
the Banned Content page is only accessible via $StrangeOldBannedContent.
If we copy $StrangeOldBannedContent to $BannedContent, everything else
will keep working.
$BannedContent = $StrangeOldBannedContent;
But now use strict will not work. When we tried this:
my $StrangeOldBannedContent; # use strict
Then BannedContent disappeared from the admin page as shown by the tests
in strange-spam.t; the correct solution uses our instead of my.
I'm not sure why.
Variables which are essentially global and which contain state are
localized before they are set. In order to localize them, they have to
be declared here using vars, first.
PdfNewGetFooterLinks shows that @NoLinkToPdf is simply a list of pages
that should not offer a PDF link at the bottom. Authors can add their
own exceptions to PdfNewGetFooterLinks, I guess, but in order to do
this from your config file, use vars.
createPDF needs $id as a parameter in order to use it. This code
worked before because the calling context was missing a my $id and
thus $id ended up being a global variable.