From 13c7a51f1f4b2f809681c4e2651bf0d3992a863e Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 10 Apr 2007 01:49:16 +0000 Subject: * Optimise displaytime, trimming maybe 6% off the build time. --- IkiWiki/Plugin/aggregate.pm | 1 - IkiWiki/Plugin/inline.pm | 5 ----- IkiWiki/Rcs/tla.pm | 1 - IkiWiki/UserInfo.pm | 1 - 4 files changed, 8 deletions(-) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index ae86d7979..2295691aa 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -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=""; diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index fc1dfdac3..d0cfbf873 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -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'; diff --git a/IkiWiki/Rcs/tla.pm b/IkiWiki/Rcs/tla.pm index 7254eb1a7..1dbc006c1 100644 --- a/IkiWiki/Rcs/tla.pm +++ b/IkiWiki/Rcs/tla.pm @@ -3,7 +3,6 @@ use warnings; use strict; use IkiWiki; -use POSIX qw(setlocale LC_CTYPE); package IkiWiki; diff --git a/IkiWiki/UserInfo.pm b/IkiWiki/UserInfo.pm index 99b3c9f0a..ba6f3d3a9 100644 --- a/IkiWiki/UserInfo.pm +++ b/IkiWiki/UserInfo.pm @@ -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'; -- cgit v1.2.3