Added libalien-wxwidgets-perl
[pkg-perl] / deb-src / libalien-wxwidgets-perl / libalien-wxwidgets-perl-0.50 / inc / version.pm
1 #!perl -w
2 package version;
3
4 use 5.005_04;
5 use strict;
6
7 use vars qw(@ISA $VERSION $CLASS *qv);
8
9 $VERSION = 0.74;
10
11 $CLASS = 'version';
12
13 eval "use version::vxs $VERSION";
14 if ( $@ ) { # don't have the XS version installed
15     eval "use version::vpp $VERSION"; # don't tempt fate
16     die "$@" if ( $@ );
17     push @ISA, "version::vpp";
18     *version::qv = \&version::vpp::qv;
19 }
20 else { # use XS module
21     push @ISA, "version::vxs";
22     *version::qv = \&version::vxs::qv;
23 }
24
25 # Preloaded methods go here.
26 sub import {
27     my ($class) = shift;
28     my $callpkg = caller();
29     no strict 'refs';
30     
31     *{$callpkg."::qv"} = 
32             sub {return bless version::qv(shift), $class }
33         unless defined(&{"$callpkg\::qv"});
34
35 #    if (@_) { # must have initialization on the use line
36 #       if ( defined $_[2] ) { # CVS style
37 #           $_[0] = version::qv($_[2]);
38 #       }
39 #       else {
40 #           $_[0] = version->new($_[1]);
41 #       }
42 #    }
43 }
44
45 1;