diff options
author | Richard Jones <rjones@redhat.com> | 2010-05-12 15:01:45 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-05-12 18:13:01 +0100 |
commit | 72324580801f2c0e2b702b430b90eb141618c7f4 (patch) | |
tree | cfa6dc5bc1b64baa4ae2fd0f56853e4d03e646d9 /perl | |
parent | b7046fecee400396a35d9cd33d1726d27373c5a2 (diff) | |
download | libguestfs-72324580801f2c0e2b702b430b90eb141618c7f4.tar.gz libguestfs-72324580801f2c0e2b702b430b90eb141618c7f4.tar.xz libguestfs-72324580801f2c0e2b702b430b90eb141618c7f4.zip |
Add version numbers to Perl modules (RHBZ#521674).
Sys::Guestfs now contains a version number which reflects the
ABI that we are compiled against, ie. '0.<MAX_PROC_NR>'. This has
the beneficial side effect of causing an error if the user tries
to mix versions of the Perl module and the XS code.
Sys::Guestfs::Lib now contains a synthetic version number which
will reflect future changes in that module.
Diffstat (limited to 'perl')
-rw-r--r-- | perl/Makefile.PL.in | 4 | ||||
-rw-r--r-- | perl/lib/Sys/Guestfs/Lib.pm | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/perl/Makefile.PL.in b/perl/Makefile.PL.in index d18aba63..410e076b 100644 --- a/perl/Makefile.PL.in +++ b/perl/Makefile.PL.in @@ -1,5 +1,5 @@ # libguestfs Perl bindings -# Copyright (C) 2009 Red Hat Inc. +# Copyright (C) 2009-2010 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ WriteMakefile ( FIRST_MAKEFILE => 'Makefile-pl', NAME => 'Sys::Guestfs', - VERSION => '@PACKAGE_VERSION@', + VERSION => '0.@MAX_PROC_NR@', LIBS => '-L@top_builddir@/src/.libs -lguestfs', INC => '-I@top_builddir@/src -I@top_srcdir@/src', diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index d3d652eb..fc3163f1 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -1,5 +1,5 @@ # Sys::Guestfs::Lib -# Copyright (C) 2009 Red Hat Inc. +# Copyright (C) 2009-2010 Red Hat Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -20,6 +20,13 @@ package Sys::Guestfs::Lib; use strict; use warnings; +# The minor part of this version number is incremented when some +# change is made to this module. The major part is incremented if we +# make a change which is not backwards compatible. It is not related +# to the libguestfs version number. +use vars qw($VERSION); +$VERSION = '0.1'; + use Carp qw(croak); use Sys::Guestfs; |