diff --git a/src/Gitolite/Common.pm b/src/Gitolite/Common.pm index d2f2cea..3ac2301 100644 --- a/src/Gitolite/Common.pm +++ b/src/Gitolite/Common.pm @@ -127,7 +127,8 @@ sub _print { } sub slurp { - local $/ = undef; + return unless defined wantarray; + local $/ = undef unless wantarray; my $fh = _open( "<", $_[0] ); return <$fh>; }