From: Joey Hess Date: Mon, 5 May 2008 18:50:26 +0000 (-0400) Subject: avoid strange FreeBSD problem X-Git-Tag: 2.45~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a7b8069b9dd1921275ef24752a65005c15d0868e;p=ikiwiki.git avoid strange FreeBSD problem I have a weird problem with Ikiwiki on FreeBSD: When rendering this page , I get "ikiwiki.setup: Modification of a read-only value attempted at /usr/local/lib/perl5/site_perl/5.8.8/IkiWiki.pm line 1300.". And converting the constructors to not operate on the parameters directly but use lexical variables fixed it. Not sure exactly when this occurs. --- diff --git a/IkiWiki.pm b/IkiWiki.pm index f5cf8ba96..98145a585 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1287,7 +1287,9 @@ use overload ( #{{{ ); #}}} sub new { #{{{ - return bless \$_[1], $_[0]; + my $class = shift; + my $value = shift; + return bless \$value, $class; } #}}} package IkiWiki::SuccessReason; @@ -1300,7 +1302,9 @@ use overload ( #{{{ ); #}}} sub new { #{{{ - return bless \$_[1], $_[0]; + my $class = shift; + my $value = shift; + return bless \$value, $class; }; #}}} package IkiWiki::PageSpec;