about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-12-28 10:05:32 +0000
committerEric Wong <mwrap-perl@80x24.org>2022-12-28 10:11:13 +0000
commitd3adc05897729513eaa86866cd66c11319fca5ff (patch)
tree49938c4124f4b4d05f55606535a1556570a6e8ea
parent357587ad14a15f5ee10931977b0fda5f2d500fd9 (diff)
downloadmwrap-d3adc05897729513eaa86866cd66c11319fca5ff.tar.gz
I'm not sure if it's really an issue, but it it narrows down
the places where uninitialized variable warnings can happen.
-rw-r--r--lib/Devel/Mwrap/Rproxy.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Devel/Mwrap/Rproxy.pm b/lib/Devel/Mwrap/Rproxy.pm
index 98cba4e..e14cd05 100644
--- a/lib/Devel/Mwrap/Rproxy.pm
+++ b/lib/Devel/Mwrap/Rproxy.pm
@@ -29,7 +29,7 @@ my $valid_pid = $^O eq 'linux' ? sub {
         my ($pid) = @_;
         if (open(my $fh, '<', "/proc/$pid/cmdline")) {
                 local $/;
-                my $str = <$fh>;
+                my $str = <$fh> // return;
                 $str =~ tr/\0/ /;
                 Plack::Util::encode_html($str);
         }