[gimp-perl] Handle undef returns.



commit 72f4d35177148f8d199c2a40649bc16b1519f6e3
Author: Ed J <edj src gnome org>
Date:   Sat May 24 18:19:26 2014 +0100

    Handle undef returns.

 examples/Perl-Console |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/examples/Perl-Console b/examples/Perl-Console
index 8e71848..fadab7c 100755
--- a/examples/Perl-Console
+++ b/examples/Perl-Console
@@ -114,7 +114,7 @@ sub process_input {
   my ($input)= @_;
   $input = 'Gtk2->main_quit' if $input eq 'exit';
   my @out = eval("no strict;no warnings;\n#line 1 \"code\"\n".$input);
-  my $output = $@ || join ' ', @out;
+  my $output = $@ || join ' ', map { $_ // '(undef)' } @out;
   chomp $output;
   "> $input\n$output";
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]