]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Optimise displaytime, trimming maybe 6% off the build time.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 10 Apr 2007 01:49:16 +0000 (01:49 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 10 Apr 2007 01:49:16 +0000 (01:49 +0000)
IkiWiki.pm
IkiWiki/Plugin/aggregate.pm
IkiWiki/Plugin/inline.pm
IkiWiki/Rcs/tla.pm
IkiWiki/UserInfo.pm
debian/changelog
po/ikiwiki.pot

index a6bfddab06f8b406fcb4bde84f745d5bc667c357..331300db067e41fde2f5a1547587bad8dea92a12 100644 (file)
@@ -6,6 +6,7 @@ use strict;
 use Encode;
 use HTML::Entities;
 use URI::Escape q{uri_escape_utf8};
+use POSIX;
 use open qw{:utf8 :std};
 
 use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase
@@ -83,8 +84,6 @@ sub checkconfig () { #{{{
                delete $ENV{LC_ALL};
        }
        if (defined $config{locale}) {
-               eval q{use POSIX};
-               error($@) if $@;
                if (POSIX::setlocale(&POSIX::LC_ALL, $config{locale})) {
                        $ENV{LANG}=$config{locale};
                        $gettext_obj=undef;
@@ -434,8 +433,6 @@ sub abs2rel ($$) { #{{{
 sub displaytime ($) { #{{{
        my $time=shift;
 
-       eval q{use POSIX};
-       error($@) if $@;
        # strftime doesn't know about encodings, so make sure
        # its output is properly treated as utf8
        return decode_utf8(POSIX::strftime(
index ae86d79790f7ca2cb57b14448ae1c35880def876..2295691aa85cfd672a11e05b73e397519dc55622 100644 (file)
@@ -319,7 +319,6 @@ sub add_page (@) { #{{{
 
                # Make sure that the file name isn't too long. 
                # NB: This doesn't check for path length limits.
-               eval q{use POSIX};
                my $max=POSIX::pathconf($config{srcdir}, &POSIX::_PC_NAME_MAX);
                if (defined $max && length(htmlfn($page)) >= $max) {
                        $c="";
index fc1dfdac37f27513e1058592399477020ca706df..d0cfbf873c93d45c74684d221d96b324fc739f3d 100644 (file)
@@ -266,8 +266,6 @@ sub get_inline_content ($$) { #{{{
 sub date_822 ($) { #{{{
        my $time=shift;
 
-       eval q{use POSIX};
-       error($@) if $@;
        my $lc_time=POSIX::setlocale(&POSIX::LC_TIME);
        POSIX::setlocale(&POSIX::LC_TIME, "C");
        my $ret=POSIX::strftime("%a, %d %b %Y %H:%M:%S %z", localtime($time));
@@ -278,8 +276,6 @@ sub date_822 ($) { #{{{
 sub date_3339 ($) { #{{{
        my $time=shift;
 
-       eval q{use POSIX};
-       error($@) if $@;
        my $lc_time=POSIX::setlocale(&POSIX::LC_TIME);
        POSIX::setlocale(&POSIX::LC_TIME, "C");
        my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", localtime($time));
@@ -401,7 +397,6 @@ sub pingurl (@) { #{{{
        defined(my $pid = fork) or error("Can't fork: $!");
        return if $pid;
        chdir '/';
-       eval q{use POSIX 'setsid'};
        setsid() or error("Can't start a new session: $!");
        open STDIN, '/dev/null';
        open STDOUT, '>/dev/null';
index 7254eb1a7f5cb6a87b4ea6b3d6aa18e34275c387..1dbc006c11f5372eb566e639a9fd3f3f52706246 100644 (file)
@@ -3,7 +3,6 @@
 use warnings;
 use strict;
 use IkiWiki;
-use POSIX qw(setlocale LC_CTYPE);
 
 package IkiWiki;
 
index 99b3c9f0aba71b5f6f00f340c05fd8ce45d64998..ba6f3d3a926cdb757a137d3d0df1ae9e230779a1 100644 (file)
@@ -157,7 +157,6 @@ sub send_commit_mails ($$$@) { #{{{
                # Daemonize, in case the mail sending takes a while.
                defined(my $pid = fork) or error("Can't fork: $!");
                return if $pid;
-               eval q{use POSIX 'setsid'};
                setsid() or error("Can't start a new session: $!");
                chdir '/';
                open STDIN, '/dev/null';
index c5578270bce1510cc6791a6ec03bb4907ad11a7f..cabed403a3ce8333eadaa78b0eb8ec46b0aa98b4 100644 (file)
@@ -14,8 +14,9 @@ ikiwiki (1.50) UNRELEASED; urgency=low
     the source page used to create it, ie it's the reverse of %renderedfiles.
   * Use %destsources in htmllink and urlto for 20-50% speedup. Thanks
     Josh Triplett for the idea.
+  * Optimise displaytime, trimming maybe 6% off the build time.
 
- -- Joey Hess <joeyh@debian.org>  Mon, 09 Apr 2007 21:09:32 -0400
+ -- Joey Hess <joeyh@debian.org>  Mon, 09 Apr 2007 21:42:14 -0400
 
 ikiwiki (1.49) unstable; urgency=low
 
index 3bb115ee9e5b294ae0cc98cd1999ba99755f1506..6ba445402f8cace7ce64096ee9bd3a9c5635d7c4 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-04-09 21:13-0400\n"
+"POT-Creation-Date: 2007-04-09 21:45-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -101,7 +101,7 @@ msgstr ""
 msgid "processed ok at %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:334
+#: ../IkiWiki/Plugin/aggregate.pm:333
 #, perl-format
 msgid "creating new page %s"
 msgstr ""
@@ -169,7 +169,7 @@ msgstr ""
 msgid "Discussion"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:396
+#: ../IkiWiki/Plugin/inline.pm:392
 msgid "RPC::XML::Client not found, not pinging"
 msgstr ""
 
@@ -541,11 +541,11 @@ msgstr ""
 msgid "usage: ikiwiki [options] source dest"
 msgstr ""
 
-#: ../IkiWiki.pm:105
+#: ../IkiWiki.pm:104
 msgid "Must specify url to wiki with --url when using --cgi"
 msgstr ""
 
-#: ../IkiWiki.pm:152 ../IkiWiki.pm:153
+#: ../IkiWiki.pm:151 ../IkiWiki.pm:152
 msgid "Error"
 msgstr ""
 
@@ -553,7 +553,7 @@ msgstr ""
 #. translators: preprocessor directive name,
 #. translators: the second a page name, the
 #. translators: third a number.
-#: ../IkiWiki.pm:625
+#: ../IkiWiki.pm:622
 #, perl-format
 msgid "%s preprocessing loop detected on %s at depth %i"
 msgstr ""