Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / share / perl / 5.18.2 / Config / | server ip : 104.21.89.46 your ip : 108.162.241.149 H O M E |
Filename | /usr/share/perl/5.18.2/Config/Extensions.pm |
Size | 1.33 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 10:10 |
Last modified | 21-Nov-2018 01:11 |
Last accessed | 06-Jul-2025 11:53 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
package Config::Extensions;
use strict;
use vars qw(%Extensions $VERSION @ISA @EXPORT_OK);
use Config;
require Exporter;
$VERSION = '0.01';
@ISA = 'Exporter';
@EXPORT_OK = '%Extensions';
foreach my $type (qw(static dynamic nonxs)) {
foreach (split /\s+/, $Config{$type . '_ext'}) {
s!/!::!g;
$Extensions{$_} = $type;
}
}
1;
__END__
=head1 NAME
Config::Extensions - hash lookup of which core extensions were built.
=head1 SYNOPSIS
use Config::Extensions '%Extensions';
if ($Extensions{PerlIO::via}) {
# This perl has PerlIO::via built
}
=head1 DESCRIPTION
The Config::Extensions module provides a hash C<%Extensions> containing all
the core extensions that were enabled for this perl. The hash is keyed by
extension name, with each entry having one of 3 possible values:
=over 4
=item dynamic
The extension is dynamically linked
=item nonxs
The extension is pure perl, so doesn't need linking to the perl executable
=item static
The extension is statically linked to the perl binary
=back
As all values evaluate to true, a simple C<if> test is good enough to determine
whether an extension is present.
All the data uses to generate the C<%Extensions> hash is already present in
the C<Config> module, but not in such a convenient format to quickly reference.
=head1 AUTHOR
Nicholas Clark <[email protected]>
=cut
use strict;
use vars qw(%Extensions $VERSION @ISA @EXPORT_OK);
use Config;
require Exporter;
$VERSION = '0.01';
@ISA = 'Exporter';
@EXPORT_OK = '%Extensions';
foreach my $type (qw(static dynamic nonxs)) {
foreach (split /\s+/, $Config{$type . '_ext'}) {
s!/!::!g;
$Extensions{$_} = $type;
}
}
1;
__END__
=head1 NAME
Config::Extensions - hash lookup of which core extensions were built.
=head1 SYNOPSIS
use Config::Extensions '%Extensions';
if ($Extensions{PerlIO::via}) {
# This perl has PerlIO::via built
}
=head1 DESCRIPTION
The Config::Extensions module provides a hash C<%Extensions> containing all
the core extensions that were enabled for this perl. The hash is keyed by
extension name, with each entry having one of 3 possible values:
=over 4
=item dynamic
The extension is dynamically linked
=item nonxs
The extension is pure perl, so doesn't need linking to the perl executable
=item static
The extension is statically linked to the perl binary
=back
As all values evaluate to true, a simple C<if> test is good enough to determine
whether an extension is present.
All the data uses to generate the C<%Extensions> hash is already present in
the C<Config> module, but not in such a convenient format to quickly reference.
=head1 AUTHOR
Nicholas Clark <[email protected]>
=cut