protect $@ whenever a block using $@ is non-trivial As noted in the Try::Tiny man page, eval/$@ can be quite awkward in corner cases, because $@ has the same properties and problems as C's errno. While writing a regression test for definetemplate in which it couldn't find an appropriate template, I received <span class="error">Error: failed to process template <span class="createlink">deftmpl</span> </span> instead of the intended <span class="error">Error: failed to process template <span class="createlink">deftmpl</span> template deftmpl not found</span> which turned out to be because the "catch"-analogous block called gettext before it used $@, and gettext can call define_gettext, which uses eval. This commit alters all current "catch"-like blocks that use $@, except those that just do trivial things with $@ (string interpolation, string concatenation) and call a function (die, error, print, etc.)
aggregrate: Fix several bugs in handling of empty and colliding titles when generating filenames.
cookiejar is now a core config setting.
Honor proxy env vars and reliably honor cookiejar.
Show author in addition to feedname, if different. While here, mollify http://validator.w3.org/feed/ and s/dcterms:creator/dc:creator/g, which happens to make rss2email see and do nice things with authors.
aggregate: When run with --aggregate, if an aggregation is already running, don't go on and --refresh. This way, if a previous aggregation job is running, we don't add additional load doing work that job will do anyway.
prune: do not prune beyond an optional base directory, and add a test Previously, prune("wiki/srcdir/sandbox/test.mdwn") could delete srcdir or even wiki, if they happened to be empty. This is rarely what you want: there's usually some base directory (destdir, srcdir, transientdir or another subdirectory of wikistatedir) beyond which you do not want to delete.
better long filename detection method Let's just try to write and fall back to a short ugly filename on error.
aggregate: Improve checking for too long aggregated filenames. Two problems fixed: 1. Files are written with a .ikiwiki-new suffix, which has to be taken into account. 2. Need to count length of bytes, not of unicode characters.
aggregate, pinger: Use Net::INET6Glue if available to support making ipv6 connections. Making outgoing ipv6 connections for openid auth is still broken; the glue module does not seem to solve that, so I did not make openid use it.
fix var name
comment about locking
call aggregate checkconfig last Since the plugin abuses the checkconfig hook to launch aggregation when in --aggregate mode, it should give other plugins that have checkconfig hooks a chance to run before they are possibly used in rendering the aggregated content.
aggregate: Read cookies from ~/.ikiwiki/cookies by default. Also, the cookiejar configuration setting can be used by other plugins to provide a custom `cookie_jar` object for LWP::UserAgent. (Thanks, schmonz)
minor optimisation Assume the aggregated content is only going to be in one of the directories, and so stop if it's successfully removed from the transientdir.
Put newly aggregated pages in the transient underlay
factored out an urlabs from aggregate and cgi
avoid fatal error if aggregate page template could not be found That template is user-controlled.
needsbuild hook interface changed; the hooks should now return the modified array of things that need built. (Backwards compatability code keeps plugins using the old interface working.)
revert bugfix Not needed; lastupdate will be 0 for new feeds.