summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-07-17 12:33:45 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-08-05 21:15:14 +0100
commita9a8f66ae82029f905705f313f807fa8d1f0e1d3 (patch)
treed8ff4599ece5dcbb3bfd61b366b4cc2cae4dfaf6 /generator
parent0157c9bbcf0b3963325846c170f99ff8dad80c57 (diff)
downloadlibguestfs-a9a8f66ae82029f905705f313f807fa8d1f0e1d3.tar.gz
libguestfs-a9a8f66ae82029f905705f313f807fa8d1f0e1d3.tar.xz
libguestfs-a9a8f66ae82029f905705f313f807fa8d1f0e1d3.zip
perl: Use $g instead of $h in documentation.
$g is the "standard" name for libguestfs handles. (cherry picked from commit a99ea198b24745c49cdb42645c3497ac3b0e6a2f)
Diffstat (limited to 'generator')
-rw-r--r--generator/generator_perl.ml38
1 files changed, 19 insertions, 19 deletions
diff --git a/generator/generator_perl.ml b/generator/generator_perl.ml
index 60ec975d..e4eea93f 100644
--- a/generator/generator_perl.ml
+++ b/generator/generator_perl.ml
@@ -610,12 +610,12 @@ Sys::Guestfs - Perl bindings for libguestfs
use Sys::Guestfs;
- my $h = Sys::Guestfs->new ();
- $h->add_drive_opts ('guest.img', format => 'raw');
- $h->launch ();
- $h->mount_options ('', '/dev/sda1', '/');
- $h->touch ('/hello');
- $h->sync ();
+ my $g = Sys::Guestfs->new ();
+ $g->add_drive_opts ('guest.img', format => 'raw');
+ $g->launch ();
+ $g->mount_options ('', '/dev/sda1', '/');
+ $g->touch ('/hello');
+ $g->sync ();
=head1 DESCRIPTION
@@ -675,7 +675,7 @@ XSLoader::load ('Sys::Guestfs');
(* Methods. *)
pr "\
-=item $h = Sys::Guestfs->new ();
+=item $g = Sys::Guestfs->new ();
Create a new guestfs handle.
@@ -691,7 +691,7 @@ sub new {
return $self;
}
-=item $h->close ();
+=item $g->close ();
Explicitly close the guestfs handle.
@@ -721,7 +721,7 @@ when the final reference is cleaned up is OK).
) events;
pr "\
-=item $event_handle = $h->set_event_callback (\\&cb, $event_bitmask);
+=item $event_handle = $g->set_event_callback (\\&cb, $event_bitmask);
Register C<cb> as a callback function for all of the events
in C<$event_bitmask> (one or more C<$Sys::Guestfs::EVENT_*> flags
@@ -759,15 +759,15 @@ You should carefully read the documentation for
L<guestfs(3)/guestfs_set_event_callback> before using
this function.
-=item $h->delete_event_callback ($event_handle);
+=item $g->delete_event_callback ($event_handle);
This removes the callback which was previously registered using
C<set_event_callback>.
-=item $errnum = $h->last_errno ();
+=item $errnum = $g->last_errno ();
This returns the last error number (errno) that happened on the
-handle C<$h>.
+handle C<$g>.
If successful, an errno integer not equal to zero is returned.
@@ -779,12 +779,12 @@ You can use the standard Perl module L<Errno(3)> to compare
the numeric error returned from this call with symbolic
errnos:
- $h->mkdir (\"/foo\");
- if ($h->last_errno() == Errno::EEXIST()) {
+ $g->mkdir (\"/foo\");
+ if ($g->last_errno() == Errno::EEXIST()) {
# mkdir failed because the directory exists already.
}
-=item $h->user_cancel ();
+=item $g->user_cancel ();
Cancel current transfer. This is safe to call from Perl signal
handlers and threads.
@@ -799,7 +799,7 @@ handlers and threads.
List.iter (
fun (name, style, _, flags, _, _, longdesc) ->
if not (List.mem NotInDocs flags) then (
- let longdesc = replace_str longdesc "C<guestfs_" "C<$h-E<gt>" in
+ let longdesc = replace_str longdesc "C<guestfs_" "C<$g-E<gt>" in
pr "=item ";
generate_perl_prototype name style;
pr "\n\n";
@@ -895,7 +895,7 @@ class, use the ordinary Perl UNIVERSAL method C<can(METHOD)>
use Sys::Guestfs;
if (defined (Sys::Guestfs->can (\"set_verbose\"))) {
- print \"\\$h->set_verbose is available\\n\";
+ print \"\\$g->set_verbose is available\\n\";
}
Perl does not offer a way to list the arguments of a method, and
@@ -929,7 +929,7 @@ To test if particular features are supported by the current
build, use the L</available> method like the example below. Note
that the appliance must be launched first.
- $h->available ( [\"augeas\"] );
+ $g->available ( [\"augeas\"] );
Since the L</available> method croaks if the feature is not supported,
you might also want to wrap this in an eval and return a boolean.
@@ -990,7 +990,7 @@ and generate_perl_prototype name (ret, args, optargs) =
| RStringList n
| RStructList (n,_) -> pr "@%s = " n
);
- pr "$h->%s (" name;
+ pr "$g->%s (" name;
let comma = ref false in
List.iter (
fun arg ->