Acme-Sort-Sleep

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

local/lib/perl5/Module/Build/Bundling.pod
local/lib/perl5/Module/Build/Compat.pm
local/lib/perl5/Module/Build/Config.pm
local/lib/perl5/Module/Build/ConfigData.pm
local/lib/perl5/Module/Build/Cookbook.pm
local/lib/perl5/Module/Build/Dumper.pm
local/lib/perl5/Module/Build/Notes.pm
local/lib/perl5/Module/Build/PPMMaker.pm
local/lib/perl5/Module/Build/Platform/Default.pm
local/lib/perl5/Module/Build/Platform/MacOS.pm
local/lib/perl5/Module/Build/Platform/Unix.pm
local/lib/perl5/Module/Build/Platform/VMS.pm
local/lib/perl5/Module/Build/Platform/VOS.pm
local/lib/perl5/Module/Build/Platform/Windows.pm
local/lib/perl5/Module/Build/Platform/aix.pm
local/lib/perl5/Module/Build/Platform/cygwin.pm
local/lib/perl5/Module/Build/Platform/darwin.pm
local/lib/perl5/Module/Build/Platform/os2.pm
local/lib/perl5/Module/Build/PodParser.pm
local/lib/perl5/Struct/Dumb.pm
local/lib/perl5/Sub/Uplevel.pm

local/cache/modules/02packages.details.txt  view on Meta::CPAN

Module::Build::Config            0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Cookbook          0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Dumper            0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Notes             0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::aix     0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::cygwin  0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::darwin  0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::Default 0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::MacOS   0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::os2     0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::Unix    0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::VMS     0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::VOS     0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::Platform::Windows 0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::PodParser         0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Module::Build::PPMMaker          0.4220  L/LE/LEONT/Module-Build-0.4220.tar.gz
Struct::Dumb                       0.09  P/PE/PEVANS/Struct-Dumb-0.09.tar.gz
Test::Future                       0.34  P/PE/PEVANS/Future-0.34.tar.gz

local/lib/perl5/IO/Async/Listener.pm  view on Meta::CPAN

       ip       => "10.0.0.1",
    },
    ...
 );

This example shows another way to listen on a UNIX socket, similar to the
earlier example:

 $listener->listen(
    addr => {
       family   => "unix",
       socktype => "stream",
       path     => "echo.sock",
    },
    ...
 );

=head2 Using A Kernel-Assigned Port Number

Rather than picking a specific port number, is it possible to ask the kernel
to assign one arbitrarily that is currently free. This can be done by

local/lib/perl5/IO/Async/Loop.pm  view on Meta::CPAN

       port     => 8001,
       ip       => "10.0.0.1",
    },
    ...
 );

This example shows another way to connect to a UNIX socket at F<echo.sock>.

 $loop->connect(
    addr => {
       family   => "unix",
       socktype => "stream",
       path     => "echo.sock",
    },
    ...
 );

=item local_addrs => ARRAY

=item local_addr => HASH or ARRAY

local/lib/perl5/IO/Async/OS.pm  view on Meta::CPAN

=back

=cut

=head2 getfamilybyname

   $family = IO::Async::OS->getfamilybyname( $name )

Return a protocol family value based on the given name. If C<$name> looks like
a number it will be returned as-is. The string values C<inet>, C<inet6> and
C<unix> will be converted to the appropriate C<AF_*> constant.

=cut

sub getfamilybyname
{
   shift;
   my ( $name ) = @_;

   return undef unless defined $name;

   return $name if $name =~ m/^\d+$/;

   return AF_INET    if $name eq "inet";
   return AF_INET6() if $name eq "inet6" and defined &AF_INET6;
   return AF_UNIX    if $name eq "unix";

   croak "Unrecognised socket family name '$name'";
}

=head2 getsocktypebyname

   $socktype = IO::Async::OS->getsocktypebyname( $name )

Return a socket type value based on the given name. If C<$name> looks like a
number it will be returned as-is. The string values C<stream>, C<dgram> and

local/lib/perl5/IO/Async/OS.pm  view on Meta::CPAN

   my $flowinfo = delete $ai->{flowinfo} || 0;

   if( HAVE_SOCKADDR_IN6 ) {
      return pack_sockaddr_in6( $port, inet_pton( AF_INET6, $ip ), $scopeid, $flowinfo );
   }
   else {
      croak "Cannot pack_sockaddr_in6";
   }
}

=item family => 'unix'

Will pack a UNIX socket path from a key called C<path>.

=cut

sub _extract_addrinfo_unix
{
   my $self = shift;
   my ( $ai ) = @_;

   defined( my $path = delete $ai->{path} ) or croak "Expected 'path' for extract_addrinfo on family='unix'";

   return pack_sockaddr_un( $path );
}

=pod

=back

=cut

local/lib/perl5/IO/Async/Process.pm  view on Meta::CPAN

=item pipe_rdwr

Only valid on the C<stdio> filehandle. The child will be given the reading end
of one C<pipe(2)> on STDIN and the writing end of another on STDOUT. A single
Stream object will be created in the parent configured for both filehandles.

=item socketpair

The child will be given one end of a C<socketpair(2)>; the parent will be
given the other. The family of this socket may be given by the extra key
called C<family>; defaulting to C<unix>. The socktype of this socket may be
given by the extra key called C<socktype>; defaulting to C<stream>. If the
type is not C<SOCK_STREAM> then a L<IO::Async::Socket> object will be
constructed for the parent side of the handle, rather than
L<IO::Async::Stream>.

=back

Once the filehandle is set up, the C<fd> method (or its shortcuts of C<stdin>,
C<stdout> or C<stderr>) may be used to access the
L<IO::Async::Handle>-subclassed object wrapped around it.

local/lib/perl5/IO/Async/Resolver.pm  view on Meta::CPAN

   die [ "$err", $err+0 ] if $err;

   return [ $host, $service ];
};

=head1 EXAMPLES

The following somewhat contrieved example shows how to implement a new
resolver function. This example just uses in-memory data, but a real function
would likely make calls to OS functions to provide an answer. In traditional
Unix style, a pair of functions are provided that each look up the entity by
either type of key, where both functions return the same type of list. This is
purely a convention, and is in no way required or enforced by the
L<IO::Async::Resolver> itself.

 @numbers = qw( zero  one   two   three four
                five  six   seven eight nine  );

 register_resolver getnumberbyindex => sub {
    my ( $index ) = @_;
    die "Bad index $index" unless $index >= 0 and $index < @numbers;

local/lib/perl5/Module/Build.pm  view on Meta::CPAN

  __PACKAGE__->_interpose_module("Module::Build::Platform::$ostype");

} else {
  warn "Unknown OS type '$^O' - using default settings\n";
}

sub os_type { return Perl::OSType::os_type() }

sub is_vmsish { return Perl::OSType::is_os_type('VMS') }
sub is_windowsish { return Perl::OSType::is_os_type('Windows') }
sub is_unixish { return Perl::OSType::is_os_type('Unix') }

1;

__END__

=for :stopwords
bindoc binhtml destdir distcheck distclean distdir distmeta distsign disttest
fakeinstall html installdirs installsitebin installsitescript installvendorbin
installvendorscript libdoc libhtml pardist ppd ppmdist realclean skipcheck
testall testcover testdb testpod testpodcoverage versioninstall

local/lib/perl5/Module/Build.pm  view on Meta::CPAN

Performs the 'distdir' action, then switches into that directory and runs a
C<perl Build.PL>, followed by the 'build' and 'test' actions in that directory.
Use PERL_MB_OPT or F<.modulebuildrc> to set options that should be applied
during subprocesses


=item docs

[version 0.20]

This will generate documentation (e.g. Unix man pages and HTML
documents) for any installable items under B<blib/> that
contain POD.  If there are no C<bindoc> or C<libdoc> installation
targets defined (as will be the case on systems that don't support
Unix manpages) no action is taken for manpages.  If there are no
C<binhtml> or C<libhtml> installation targets defined no action is
taken for HTML documents.

=item fakeinstall

[version 0.02]

This is just like the C<install> action, but it won't actually do
anything, it will just report what it I<would> have done if you had
actually run the C<install> action.

local/lib/perl5/Module/Build.pm  view on Meta::CPAN


=item bin

"Architecture-dependent" executable programs, i.e. compiled C code or
something.  Pretty rare to see this in a perl distribution, but it
happens.

=item bindoc

Documentation for the stuff in C<script> and C<bin>.  Usually
generated from the POD in those files.  Under Unix, these are manual
pages belonging to the 'man1' category.

=item libdoc

Documentation for the stuff in C<lib> and C<arch>.  This is usually
generated from the POD in F<.pm> files.  Under Unix, these are manual
pages belonging to the 'man3' category.

=item binhtml

This is the same as C<bindoc> above, but applies to HTML documents.

=item libhtml

This is the same as C<libdoc> above, but applies to HTML documents.

local/lib/perl5/Module/Build/API.pod  view on Meta::CPAN

The files are specified with the C<.PL> files as hash keys, and the
file(s) they generate as hash values, like so:

  my $build = Module::Build->new
    (
     module_name => 'Foo::Bar',
     ...
     PL_files => { 'lib/Foo/Bar.pm.PL' => 'lib/Foo/Bar.pm' },
    );

Note that the path specifications are I<always> given in Unix-like
format, not in the style of the local system.

If your C<.PL> scripts don't create any files, or if they create files
with unexpected names, or even if they create multiple files, you can
indicate that so that Module::Build can properly handle these created
files:

  PL_files => {
               'lib/Foo/Bar.pm.PL' => 'lib/Foo/Bar.pm',
               'lib/something.PL'  => ['/lib/something', '/lib/else'],

local/lib/perl5/Module/Build/API.pod  view on Meta::CPAN

    (
     module_name => 'Foo::Bar',
     ...
     pm_files => { 'Bar.pm' => 'lib/Foo/Bar.pm' },
    );

Note that the values should include C<lib/>, because this is where
they would be found in a "normal" Module::Build-style distribution.

Note also that the path specifications are I<always> given in
Unix-like format, not in the style of the local system.

=item pod_files

[version 0.19]

Just like C<pm_files>, but used for specifying the set of C<.pod>
files in your distribution.

=item recommends

local/lib/perl5/Module/Build/API.pod  view on Meta::CPAN

L<Module::Build::Cookbook/"Adding new file types to the build process">.

=item add_to_cleanup(@files)

[version 0.03]

You may call C<< $self->add_to_cleanup(@patterns) >> to tell
C<Module::Build> that certain files should be removed when the user
performs the C<Build clean> action.  The arguments to the method are
patterns suitable for passing to Perl's C<glob()> function, specified
in either Unix format or the current machine's native format.  It's
usually convenient to use Unix format when you hard-code the filenames
(e.g. in F<Build.PL>) and the native format when the names are
programmatically generated (e.g. in a testing script).

I decided to provide a dynamic method of the C<$build> object, rather
than just use a static list of files named in the F<Build.PL>, because
these static lists can get difficult to manage.  I usually prefer to
keep the responsibility for registering temporary files close to the
code that creates them.

=item args()

local/lib/perl5/Module/Build/API.pod  view on Meta::CPAN


[version 0.??]

Modify any "shebang" line in the specified files to use the path to the
perl executable being used for the current build.  Files are modified
in-place.  The existing shebang line must have a command that contains
"C<perl>"; arguments to the command do not count.  In particular, this
means that the use of C<#!/usr/bin/env perl> will not be changed.

For an explanation of shebang lines, see
L<http://en.wikipedia.org/wiki/Shebang_%28Unix%29>.

=item have_c_compiler()

[version 0.21]

Returns true if the current system seems to have a working C compiler.
We currently determine this by attempting to compile a simple C source
file and reporting whether the attempt was successful.

=item install_base_relpaths()

local/lib/perl5/Module/Build/API.pod  view on Meta::CPAN

want to set the relative install path for custom build elements.

With no argument, it returns a reference to a hash containing all
elements and their respective values. This hash should not be modified
directly; use the multiple argument below form to change values.

The single argument form returns the value associated with the
element C<$type>.

The multiple argument form allows you to set the paths for element types.
C<$value> must be a relative path using Unix-like paths.  (A series of
directories separated by slashes, e.g. C<foo/bar>.)  The return value is a
localized path based on C<$value>.

Assigning the value C<undef> to an element causes it to be removed.

=item install_destination($type)

[version 0.28]

Returns the directory in which items of type C<$type> (e.g. C<lib>,

local/lib/perl5/Module/Build/API.pod  view on Meta::CPAN

before the F<Build> script chdir()-ed into the C<base_dir>.  This
might be useful for writing wrapper tools that might need to chdir()
back out.

=item os_type()

[version 0.04]

If you're subclassing Module::Build and some code needs to alter its
behavior based on the current platform, you may only need to know
whether you're running on Windows, Unix, MacOS, VMS, etc., and not the
fine-grained value of Perl's C<$^O> variable.  The C<os_type()> method
will return a string like C<Windows>, C<Unix>, C<MacOS>, C<VMS>, or
whatever is appropriate.  If you're running on an unknown platform, it
will return C<undef> - there shouldn't be many unknown platforms
though.

=item is_vmsish()

=item is_windowsish()

=item is_unixish()

Convenience functions that return a boolean value indicating whether
this platform behaves respectively like VMS, Windows, or Unix.  For
arbitrary reasons other platforms don't get their own such functions,
at least not yet.


=item prefix_relpaths()

=item prefix_relpaths($installdirs)

=item prefix_relpaths($installdirs, $type)

local/lib/perl5/Module/Build/API.pod  view on Meta::CPAN

all elements and their respective values as defined by
C<$installdirs>.

The hash returned by the above calls should not be modified directly;
use the three-argument below form to change values.

The two argument form returns the value associated with the
element C<$type>.

The multiple argument form allows you to set the paths for element types.
C<$value> must be a relative path using Unix-like paths.  (A series of
directories separated by slashes, e.g. C<foo/bar>.)  The return value is a
localized path based on C<$value>.

Assigning the value C<undef> to an element causes it to be removed.

=item get_metadata()

[version 0.36]

This method returns a hash reference of metadata that can be used to create a

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

    return $self->_maybe_command($command);

  } else {
    for my $dir ( File::Spec->path ) {
      my $abs = File::Spec->catfile($dir, $command);
      return $abs if $abs = $self->_maybe_command($abs);
    }
  }
}

# Copied from ExtUtils::MM_Unix::maybe_command
sub _maybe_command {
  my($self,$file) = @_;
  return $file if -x $file && ! -d $file;
  return;
}

sub _is_interactive {
  return -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ;   # Pipe?
}

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

  if ($status->{ok}) {
    return $status->{have} if $status->{have} and "$status->{have}" ne '<none>';
    return '0 but true';
  }

  $@ = $status->{message};
  return 0;
}

sub make_executable {
  # Perl's chmod() is mapped to useful things on various non-Unix
  # platforms, so we use it in the base class even though it looks
  # Unixish.

  my $self = shift;
  foreach (@_) {
    my $current_mode = (stat $_)[2];
    chmod $current_mode | oct(111), $_;
  }
}

sub is_executable {
  # We assume this does the right thing on generic platforms, though
  # we do some other more specific stuff on Unixish platforms.
  my ($self, $file) = @_;
  return -x $file;
}

sub _startperl { shift()->config('startperl') }

# Return any directories in @INC which are not in the default @INC for
# this perl.  For example, stuff passed in with -I or loaded with "use lib".
sub _added_to_INC {
  my $self = shift;

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

  }

  if ($args{makefile_env_macros}) {
    require Module::Build::Compat;
    %args = (%args, Module::Build::Compat->makefile_to_build_macros);
  }

  return \%args, $action;
}

# Default: do nothing.  Overridden for Unix & Windows.
sub _detildefy {}


# merge Module::Build argument lists that have already been parsed
# by read_args(). Takes two references to option hashes and merges
# the contents, giving priority to the first.
sub _merge_arglist {
  my( $self, $opts1, $opts2 ) = @_;

  $opts1 ||= {};

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

  foreach my $file (sort keys %$files) {
    my $result = $self->copy_if_modified($file, $script_dir, 'flatten') or next;
    $self->fix_shebang_line($result) unless $self->is_vmsish;
    $self->make_executable($result);
  }
}

sub find_PL_files {
  my $self = shift;
  if (my $files = $self->{properties}{PL_files}) {
    # 'PL_files' is given as a Unix file spec, so we localize_file_path().

    if (ref $files eq 'ARRAY') {
      return { map {$_, [/^(.*)\.PL$/]}
               map $self->localize_file_path($_),
               @$files };

    } elsif (ref $files eq 'HASH') {
      my %out;
      while (my ($file, $to) = each %$files) {
        $out{ $self->localize_file_path($file) } = [ map $self->localize_file_path($_),

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

  };
}

sub find_pm_files  { shift->_find_file_by_type('pm',  'lib') }
sub find_pod_files { shift->_find_file_by_type('pod', 'lib') }
sub find_xs_files  { shift->_find_file_by_type('xs',  'lib') }

sub find_script_files {
  my $self = shift;
  if (my $files = $self->script_files) {
    # Always given as a Unix file spec.  Values in the hash are
    # meaningless, but we preserve if present.
    return { map {$self->localize_file_path($_), $files->{$_}} keys %$files };
  }

  # No default location for script files
  return {};
}

sub find_test_files {
  my $self = shift;
  my $p = $self->{properties};

  if (my $files = $p->{test_files}) {
    $files = [sort keys %$files] if ref $files eq 'HASH';
    $files = [map { -d $_ ? $self->expand_test_dir($_) : $_ }
              map glob,
              $self->split_like_shell($files)];

    # Always given as a Unix file spec.
    return [ map $self->localize_file_path($_), @$files ];

  } else {
    # Find all possible tests in t/ or test.pl
    my @tests;
    push @tests, 'test.pl'                          if -e 'test.pl';
    push @tests, $self->expand_test_dir('t')        if -e 't' and -d _;
    return \@tests;
  }
}

sub _find_file_by_type {
  my ($self, $type, $dir) = @_;

  if (my $files = $self->{properties}{"${type}_files"}) {
    # Always given as a Unix file spec
    return { map $self->localize_file_path($_), %$files };
  }

  return {} unless -d $dir;
  return { map {$_, $_}
           map $self->localize_file_path($_),
           grep !/\.\#/,
           @{ $self->rscan_dir($dir, $self->file_qr("\\.$type\$")) } };
}

sub localize_file_path {
  my ($self, $path) = @_;
  return File::Spec->catfile( split m{/}, $path );
}

sub localize_dir_path {
  my ($self, $path) = @_;
  return File::Spec->catdir( split m{/}, $path );
}

sub fix_shebang_line { # Adapted from fixin() in ExtUtils::MM_Unix 1.35
  my ($self, @files) = @_;
  my $c = ref($self) ? $self->{config} : 'Module::Build::Config';

  my ($does_shbang) = $c->get('sharpbang') =~ /^\s*\#\!/;
  for my $file (@files) {
    open(my $FIXIN, '<', $file) or die "Can't process '$file': $!";
    local $/ = "\n";
    chomp(my $line = <$FIXIN>);
    next unless $line =~ s/^\s*\#!\s*//;     # Not a shebang file.

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

    open($fh, '>', $outfile) or die "Can't write $outfile: $!";
    print $fh $html;
    close $fh;
    unlink($tmpfile);
  }

  return ! $errors;

}

# Adapted from ExtUtils::MM_Unix
sub man1page_name {
  my $self = shift;
  return File::Basename::basename( shift );
}

# Adapted from ExtUtils::MM_Unix and Pod::Man
# Depending on M::B's dependency policy, it might make more sense to refactor
# Pod::Man::begin_pod() to extract a name() methods, and use them...
#    -spurkis
sub man3page_name {
  my $self = shift;
  my ($vol, $dirs, $file) = File::Spec->splitpath( shift );
  my @dirs = File::Spec->splitdir( File::Spec->canonpath($dirs) );

  # Remove known exts from the base name
  $file =~ s/\.p(?:od|m|l)\z//i;

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

    unless defined( $type );

  # set undef if $value is literal undef()
  if ( ! defined( $value ) ) {
    $map->{$type} = undef;
    return;
  }
  # set value if $value is a valid relative path
  else {
    Carp::croak( "Value must be a relative path" )
      if File::Spec::Unix->file_name_is_absolute($value);

    my @value = split( /\//, $value );
    $map->{$type} = \@value;
  }
}

# Translated from ExtUtils::MM_Any::init_INSTALL_from_PREFIX
sub prefix_relative {
  my ($self, $type) = @_;
  my $installdirs = $self->installdirs;

  my $relpath = $self->install_sets($installdirs)->{$type};

  return $self->_prefixify($relpath,
                           $self->original_prefix($installdirs),
                           $type,
                          );
}

# Translated from ExtUtils::MM_Unix::prefixify()
sub _prefixify {
  my($self, $path, $sprefix, $type) = @_;

  my $rprefix = $self->prefix;
  $rprefix .= '/' if $sprefix =~ m|/$|;

  $self->log_verbose("  prefixify $path from $sprefix to $rprefix\n")
    if defined( $path ) && length( $path );

  if( !defined( $path ) || ( length( $path ) == 0 ) ) {

local/lib/perl5/Module/Build/Base.pm  view on Meta::CPAN

  my( %map, @skipping );
  foreach my $type ($self->install_types) {
    my $localdir = File::Spec->catdir( $blib, $type );
    next unless -e $localdir;

    # the line "...next if (($type eq 'bindoc'..." was one of many changes introduced for
    # improving HTML generation on ActivePerl, see https://rt.cpan.org/Public/Bug/Display.html?id=53478
    # Most changes were ok, but this particular line caused test failures in t/manifypods.t on windows,
    # therefore it is commented out.

    # ********* next if (($type eq 'bindoc' || $type eq 'libdoc') && not $self->is_unixish);

    if (my $dest = $self->install_destination($type)) {
      $map{$localdir} = $dest;
    } else {
      push( @skipping, $type );
    }
  }

  $self->log_warn(
    "WARNING: Can't figure out install path for types: @skipping\n" .

local/lib/perl5/Module/Build/Bundling.pod  view on Meta::CPAN

For I<users>, inc::latest will load the latest Module::Build, whether
installed or bundled in C<inc/>.

=head1 BUNDLING OTHER CONFIGURATION DEPENDENCIES

The same approach works for other configuration dependencies -- modules
that I<must> be available for Build.PL to run.  All other dependencies can
be specified as usual in the Build.PL and CPAN or CPANPLUS will install
them after Build.PL finishes.

For example, to bundle the L<Devel::AssertOS::Unix> module (which ensures a
"Unix-like" operating system), one could do this:

  use inc::latest 'Devel::AssertOS::Unix';
  use inc::latest 'Module::Build';

  Module::Build->new(
    module_name => 'Foo::Bar',
    license => 'perl',
  )->create_build_script;

The C<inc::latest> module creates bundled directories based on the packlist
file of an installed distribution.  Even though C<inc::latest> takes module
name arguments, it is better to think of it as bundling and making
available entire I<distributions>.  When a module is loaded through
C<inc::latest>, it looks in all bundled distributions in C<inc/> for a
newer module than can be found in the existing C<@INC> array.

Thus, the module-name provided should usually be the "top-level" module
name of a distribution, though this is not strictly required.  For example,
L<Module::Build> has a number of heuristics to map module names to
packlists, allowing users to do things like this:

  use inc::latest 'Devel::AssertOS::Unix';

even though Devel::AssertOS::Unix is contained within the Devel-CheckOS
distribution.

At the current time, packlists are required.  Thus, bundling dual-core
modules, I<including Module::Build>, may require a 'forced install' over
versions in the latest version of perl in order to create the necessary
packlist for bundling.  This limitation will hopefully be addressed in a
future version of Module::Build.

=head2 WARNING -- How to Manage Dependency Chains

local/lib/perl5/Module/Build/Compat.pm  view on Meta::CPAN


  # Minimum perl version should be specified as "require 5.XXXXXX" in
  # Makefile.PL
  my $requires = $build->requires;
  if ( my $minimum_perl = $requires->{perl} ) {
    my $min_ver = version->new($minimum_perl)->numify;
    print {$fh} "require $min_ver;\n";
  }

  # If a *bundled* custom subclass is being used, make sure we add its
  # directory to @INC.  Also, lib.pm always needs paths in Unix format.
  my $subclass_load = '';
  if (ref($build) ne "Module::Build") {
    my $subclass_dir = $package->subclass_dir($build);

    if (File::Spec->file_name_is_absolute($subclass_dir)) {
      my $base_dir = $build->base_dir;

      if ($build->dir_contains($base_dir, $subclass_dir)) {
	$subclass_dir = File::Spec->abs2rel($subclass_dir, $base_dir);
	$subclass_dir = $package->unixify_dir($subclass_dir);
        $subclass_load = "use lib '$subclass_dir';";
      }
      # Otherwise, leave it the empty string

    } else {
      $subclass_dir = $package->unixify_dir($subclass_dir);
      $subclass_load = "use lib '$subclass_dir';";
    }
  }

  if ($type eq 'small') {
    printf {$fh} <<'EOF', $subclass_load, ref($build), ref($build);
    use Module::Build::Compat 0.02;
    %s
    Module::Build::Compat->run_build_pl(args => \@ARGV);
    require %s;

local/lib/perl5/Module/Build/Compat.pm  view on Meta::CPAN

         @{$build->rscan_dir('t', sub { -d $File::Find::name })};
}

sub subclass_dir {
  my ($self, $build) = @_;

  return (Module::Metadata->find_module_dir_by_name(ref $build)
	  || File::Spec->catdir($build->config_dir, 'lib'));
}

sub unixify_dir {
  my ($self, $path) = @_;
  return join '/', File::Spec->splitdir($path);
}

sub makefile_to_build_args {
  my $class = shift;
  my @out;
  foreach my $arg (@_) {
    next if $arg eq '';

local/lib/perl5/Module/Build/ConfigData.pm  view on Meta::CPAN

                                                     'inc::latest' => '0.5'
                                                   }
                                   },
         'license_creation' => {
                                 'description' => 'Create licenses automatically in distributions',
                                 'requires' => {
                                                 'Software::License' => '0.103009'
                                               }
                               },
         'manpage_support' => {
                                'description' => 'Create Unix man pages',
                                'requires' => {
                                                'Pod::Man' => 0
                                              }
                              }
       }
     ];
$x; }

local/lib/perl5/Module/Build/PPMMaker.pm  view on Meta::CPAN

package Module::Build::PPMMaker;

use strict;
use warnings;
use Config;

our $VERSION = '0.4220';
$VERSION = eval $VERSION;

# This code is mostly borrowed from ExtUtils::MM_Unix 6.10_03, with a
# few tweaks based on the PPD spec at
# http://www.xav.com/perl/site/lib/XML/PPD.html

# The PPD spec is based on <http://www.w3.org/TR/NOTE-OSD>

sub new {
  my $package = shift;
  return bless {@_}, $package;
}

local/lib/perl5/Module/Build/Platform/Unix.pm  view on Meta::CPAN

package Module::Build::Platform::Unix;

use strict;
use warnings;
our $VERSION = '0.4220';
$VERSION = eval $VERSION;
use Module::Build::Base;

our @ISA = qw(Module::Build::Base);

sub is_executable {

local/lib/perl5/Module/Build/Platform/Unix.pm  view on Meta::CPAN

  # unfortunately Red Hat 9 shipped it like that.  Fix 'em up here.
  my $c = $self->{config};
  for (qw(siteman1 siteman3 vendorman1 vendorman3)) {
    $c->{"install${_}dir"} ||= $c->{"install${_}"};
  }

  return $self;
}

# Open group says username should be portable filename characters,
# but some Unix OS working with ActiveDirectory wind up with user-names
# with back-slashes in the name.  The new code below is very liberal
# in what it accepts.
sub _detildefy {
  my ($self, $value) = @_;
  $value =~ s[^~([^/]+)?(?=/|$)]   # tilde with optional username
    [$1 ?
     (eval{(getpwnam $1)[7]} || "~$1") :
     ($ENV{HOME} || eval{(getpwuid $>)[7]} || glob("~"))
    ]ex;
  return $value;
}

1;
__END__


=head1 NAME

Module::Build::Platform::Unix - Builder class for Unix platforms

=head1 DESCRIPTION

The sole purpose of this module is to inherit from
C<Module::Build::Base>.  Please see the L<Module::Build> for the docs.

=head1 AUTHOR

Ken Williams <kwilliams@cpan.org>

local/lib/perl5/Module/Build/Platform/VMS.pm  view on Meta::CPAN


    $oneliner =~ s/^\"\S+\"//;

    return "MCR $^X $oneliner";
}

=item rscan_dir

Inherit the standard version but remove dots at end of name.
If the extended character set is in effect, do not remove dots from filenames
with Unix path delimiters.

=cut

sub rscan_dir {
  my ($self, $dir, $pattern) = @_;

  my $result = $self->SUPER::rscan_dir( $dir, $pattern );

  for my $file (@$result) {
      if (!_efs() && ($file =~ m#/#)) {

local/lib/perl5/Module/Build/Platform/VMS.pm  view on Meta::CPAN

    if ($arg =~ /^~/) {
        my $spec = $arg;

        # Remove the tilde
        $spec =~ s/^~//;

        # Remove any slash following the tilde if present.
        $spec =~ s#^/##;

        # break up the paths for the merge
        my $home = VMS::Filespec::unixify($ENV{HOME});

        # In the default VMS mode, the trailing slash is present.
        # In Unix report mode it is not.  The parsing logic assumes that
        # it is present.
        $home .= '/' unless $home =~ m#/$#;

        # Trivial case of just ~ by it self
        if ($spec eq '') {
            $home =~ s#/$##;
            return $home;
        }

        my ($hvol, $hdir, $hfile) = File::Spec::Unix->splitpath($home);
        if ($hdir eq '') {
             # Someone has tampered with $ENV{HOME}
             # So hfile is probably the directory since this should be
             # a path.
             $hdir = $hfile;
        }

        my ($vol, $dir, $file) = File::Spec::Unix->splitpath($spec);

        my @hdirs = File::Spec::Unix->splitdir($hdir);
        my @dirs = File::Spec::Unix->splitdir($dir);

        unless ($arg =~ m#^~/#) {
            # There is a home directory after the tilde, but it will already
            # be present in in @hdirs so we need to remove it by from @dirs.

            shift @dirs;
        }
        my $newdirs = File::Spec::Unix->catdir(@hdirs, @dirs);

        $arg = File::Spec::Unix->catpath($hvol, $newdirs, $file);
    }
    return $arg;

}

=item find_perl_interpreter

On VMS, $^X returns the fully qualified absolute path including version
number.  It's logically impossible to improve on it for getting the perl
we're currently running, and attempting to manipulate it is usually

local/lib/perl5/Module/Build/Platform/VMS.pm  view on Meta::CPAN


my $use_feature;
BEGIN {
    if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
        $use_feature = 1;
    }
}

# Need to look up the UNIX report mode.  This may become a dynamic mode
# in the future.
sub _unix_rpt {
    my $unix_rpt;
    if ($use_feature) {
        $unix_rpt = VMS::Feature::current("filename_unix_report");
    } else {
        my $env_unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
        $unix_rpt = $env_unix_rpt =~ /^[ET1]/i;
    }
    return $unix_rpt;
}

# Need to look up the EFS character set mode.  This may become a dynamic
# mode in the future.
sub _efs {
    my $efs;
    if ($use_feature) {
        $efs = VMS::Feature::current("efs_charset");
    } else {
        my $env_efs = $ENV{'DECC$EFS_CHARSET'} || '';

local/lib/perl5/Module/Build/Platform/Windows.pm  view on Meta::CPAN

      push @quoted, qq("$_");
    }
  }

  return join " ", @quoted;
}


sub split_like_shell {
  # As it turns out, Windows command-parsing is very different from
  # Unix command-parsing.  Double-quotes mean different things,
  # backslashes don't necessarily mean escapes, and so on.  So we
  # can't use Text::ParseWords::shellwords() to break a command string
  # into words.  The algorithm below was bashed out by Randy and Ken
  # (mostly Randy), and there are a lot of regression tests, so we
  # should feel free to adjust if desired.

  (my $self, local $_) = @_;

  return @$_ if defined() && ref() eq 'ARRAY';

local/lib/perl5/Module/Build/Platform/aix.pm  view on Meta::CPAN

package Module::Build::Platform::aix;

use strict;
use warnings;
our $VERSION = '0.4220';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;

our @ISA = qw(Module::Build::Platform::Unix);

# This class isn't necessary anymore, but we can't delete it, because
# some people might still have the old copy in their @INC, containing
# code we don't want to execute, so we have to make sure an upgrade
# will replace it with this empty subclass.

1;
__END__


local/lib/perl5/Module/Build/Platform/cygwin.pm  view on Meta::CPAN

package Module::Build::Platform::cygwin;

use strict;
use warnings;
our $VERSION = '0.4220';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;

our @ISA = qw(Module::Build::Platform::Unix);

sub manpage_separator {
   '.'
}

# Copied from ExtUtils::MM_Cygwin::maybe_command()
# If our path begins with F</cygdrive/> then we use the Windows version
# to determine if it may be a command.  Otherwise we use the tests
# from C<ExtUtils::MM_Unix>.

sub _maybe_command {
    my ($self, $file) = @_;

    if ($file =~ m{^/cygdrive/}i) {
        require Module::Build::Platform::Windows;
        return Module::Build::Platform::Windows->_maybe_command($file);
    }

    return $self->SUPER::_maybe_command($file);

local/lib/perl5/Module/Build/Platform/darwin.pm  view on Meta::CPAN

package Module::Build::Platform::darwin;

use strict;
use warnings;
our $VERSION = '0.4220';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;

our @ISA = qw(Module::Build::Platform::Unix);

# This class isn't necessary anymore, but we can't delete it, because
# some people might still have the old copy in their @INC, containing
# code we don't want to execute, so we have to make sure an upgrade
# will replace it with this empty subclass.

1;
__END__


local/lib/perl5/Module/Build/Platform/os2.pm  view on Meta::CPAN

package Module::Build::Platform::os2;

use strict;
use warnings;
our $VERSION = '0.4220';
$VERSION = eval $VERSION;
use Module::Build::Platform::Unix;

our @ISA = qw(Module::Build::Platform::Unix);

sub manpage_separator { '.' }

sub have_forkpipe { 0 }

# Copied from ExtUtils::MM_OS2::maybe_command
sub _maybe_command {
    my($self,$file) = @_;
    $file =~ s,[/\\]+,/,g;
    return $file if -x $file && ! -d _;



( run in 1.105 second using v1.01-cache-2.11-cpan-df04353d9ac )