1package Imlib2;
2
3use strict;
4use Carp;
5use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
6
7require Exporter;
8require DynaLoader;
9require AutoLoader;
10
11@ISA = qw(Exporter DynaLoader);
12# Items to export into callers namespace by default. Note: do not export
13# names by default without a very good reason. Use EXPORT_OK instead.
14# Do not simply export all your public functions/methods/constants.
15@EXPORT = qw(
16);
17$VERSION = '0.02';
18
19sub AUTOLOAD {
20    # This AUTOLOAD is used to 'autoload' constants from the constant()
21    # XS function.  If a constant is not found then control is passed
22    # to the AUTOLOAD in AutoLoader.
23
24    my $constname;
25    ($constname = $AUTOLOAD) =~ s/.*:://;
26    croak "& not defined" if $constname eq 'constant';
27    my $val = constant($constname, @_ ? $_[0] : 0);
28    if ($! != 0) {
29	if ($! =~ /Invalid/) {
30	    $AutoLoader::AUTOLOAD = $AUTOLOAD;
31	    goto &AutoLoader::AUTOLOAD;
32	}
33	else {
34		croak "Your vendor has not defined Imlib2 macro $constname";
35	}
36    }
37    no strict 'refs';
38    *$AUTOLOAD = sub () { $val };
39    goto &$AUTOLOAD;
40}
41
42bootstrap Imlib2 $VERSION;
43
44# Preloaded methods go here.
45
46# Autoload methods go after =cut, and are processed by the autosplit program.
47
481;
49__END__
50# Below is the stub of documentation for your module. You better edit it!
51
52=head1 NAME
53
54Imlib2 - Perl extension.
55
56=head1 SYNOPSIS
57
58  use Imlib2;
59  $image = Imlib2::load_image(pathtoimage);
60
61=head1 DESCRIPTION
62
63  Load an image.
64
65=head1 Exported constants
66
67
68=head1 AUTHOR
69
70Maher Awamy <muhri@muhri.net>
71
72
73=cut
74