xpath_do now returns a list of results if you're calling it in list
context. This will work, for example:
my ($ts, $title, $text) = xpath_test($page,
'//input[@name="oldtime"]/attribute::value',
'//input[@name="title"]/attribute::value',
'//textarea[@name="text"]/text()');
Move the writing of the config file (and the resetting of the important
variables) into a separate file so that tests can reset the config file
without clearing all the pages.
Recent GNU/Linux systems use ext3 or ext4 file systems. These use HTree
to index files. Wikipedia says: "HTree indexing improved the scalability
of Linux ext2 based filesystems from a practical limit of a few thousand
files, into the range of tens of millions of files per directory. [...]
HTree indexes are available in ext3 when the dir_index feature is
enabled. [...] HTree indexes are turned on by default in ext4."
Thus, instead of working on balanced-page-directories.pl, we decided to
get rid of these sub-directories altogether.
Unfortunately, this is backwards incompatible. Users wanting to upgrade
will need to install the upgrade.pl extension in order to upgrade the
file database.
Try to guess which Perl we should be using. Since we loaded wiki.pl,
our $ENV{PATH} is set to /bin:/usr/bin in order to find diff and grep.
Prepending /usr/local/bin is one option, using $PERLBREW_PATH is
another.
This also fixes the tests. Also get rid of wide character in print by
Test::Builder by adding the fix mentioned in the Test::More manpage.
The DB_File issue was necessary because a page name with an EN DASH
caused the script to crash, thus not printing the footer.
Unfortunately, this is solved by URL-encoding keys and values. This
means that your old mail.db is going to be invalid!
Without this, running t/tags.t will alternate between running ok and
producing an error: "Cannot open test-data/page/I/InterMap.pg: No such
file or directory"
Issues:
- the Mac layer was masking issues because of the NFC/NFD difference and existing compatiblity hacks in mac.pl
- drafts.pl was suffering from a double encoding issue
- crossbar.t and download.t tests were failing because I had recently fixed DoDownload output to be raw instead of encoded
- test.pl now has a way to capture the raw, unencoded output produced by DoDownload
- tags.t got some tests to prove that recent changes to wiki.pl actually work
The Debian installation uses ext3 and therefore raw bytes for
filenames unlike the HFS filesystem of Mac OSX.
Copyright years were updated. The maintenance output of for drafts was
cleaned up.
All the source files containing non-ASCII characters needed to have
utf8 added. This will be necessary for user config files as well! The
regular expressions identifying page names had to be changed.
UrlEncode translates the string back to bytes before encoding it.
Cached RSS files are saved with UTF-8 encoding and therefore need
their meta-data changed (using the XML::RSS module to do this
correctly didn't work for some of the test files). The CGI object's
parameters, keywords and info_path are decoded correctly. File access
uses the UTF-8 layer (reading, writing, appending, access to the log
of recent changes, running sub processes with grep and diff).
The mac compatibility extension will also disable the use of grep if
non-ASCII characters are searched for because of an unexplained
problem with grep.