]>
git.proxmox.com Git - libxdgmime-perl.git/blob - Xdgmime/lib/Xdgmime.pm
11 our @ISA = qw(Exporter);
13 # Items to export into callers namespace by default. Note: do not export
14 # names by default without a very good reason. Use EXPORT_OK instead.
15 # Do not simply export all your public functions/methods/constants.
17 # This allows declaration use Xdgmime ':all';
18 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
20 our %EXPORT_TAGS = ( 'all' => [ qw(
22 XDG_MIME_TYPE_TEXTPLAIN
25 xdg_mime_get_max_buffer_extents
26 xdg_mime_get_mime_type_for_data
27 xdg_mime_get_mime_type_for_file
28 xdg_mime_get_mime_type_from_file_name
29 xdg_mime_is_valid_mime_type
30 xdg_mime_list_mime_parents
31 xdg_mime_media_type_equal
32 xdg_mime_mime_type_equal
33 xdg_mime_mime_type_subclass
37 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
41 XDG_MIME_TYPE_TEXTPLAIN
44 xdg_mime_get_max_buffer_extents
45 xdg_mime_get_mime_type_for_data
46 xdg_mime_get_mime_type_for_file
47 xdg_mime_get_mime_type_from_file_name
48 xdg_mime_is_valid_mime_type
49 xdg_mime_list_mime_parents
50 xdg_mime_media_type_equal
51 xdg_mime_mime_type_equal
52 xdg_mime_mime_type_subclass
59 # This AUTOLOAD is used to 'autoload' constants from the constant()
64 ($constname = $AUTOLOAD) =~ s/.*:://;
65 croak
"&Xdgmime::constant not defined" if $constname eq 'constant';
66 my ($error, $val) = constant($constname);
67 if ($error) { croak
$error; }
70 # Fixed between 5.005_53 and 5.005_61
71 #XXX if ($] >= 5.00561) {
72 #XXX *$AUTOLOAD = sub () { $val };
75 *$AUTOLOAD = sub { $val };
82 XSLoader
::load
('Xdgmime', $VERSION);
84 # Preloaded methods go here.
86 # Autoload methods go after __END__, and are processed by the autosplit program.