[perl-glib-io: 1/3] Fix examples in SYNOPSIS section in doc




commit 9d1d8471768bb7bde8510311a360013fc7db5568
Author: Michal Josef Špaček <mspacek redhat com>
Date:   Tue May 4 23:18:17 2021 +0200

    Fix examples in SYNOPSIS section in doc

 lib/Glib/IO.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/lib/Glib/IO.pm b/lib/Glib/IO.pm
index 92d3dd3..29b9bb0 100644
--- a/lib/Glib/IO.pm
+++ b/lib/Glib/IO.pm
@@ -14,8 +14,7 @@ Glib::IO - Perl bindings to the GIO library
   # Synchronous I/O
   $cur_dir = Glib::IO::File::new_for_path('.');
   $enumerator = $cur_dir->enumerate_children('standard::*', [], undef);
-  $file_info = $enumerator->next_file(undef);
-  while ($next_file) {
+  while ($file_info = $enumerator->next_file(undef)) {
       say 'Path: ' + $file_info->get_name();
   }
 
@@ -28,7 +27,7 @@ Glib::IO - Perl bindings to the GIO library
       say 'Can read:  ' + $info->get_attribute_boolean('access::can-read');
       say 'Can write: ' + $info->get_attribute_boolean('access::can-write');
       $loop->quit();
-  }
+  });
   $loop->run();
 
   # Platform API


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