SOOT

 view release on metacpan or  search on metacpan

inc/inc_ExtUtils-CBuilder/ExtUtils/CBuilder/Base.pm  view on Meta::CPAN

  my $class = shift;
  my $self = bless {@_}, $class;

  $self->{properties}{perl} = $class->find_perl_interpreter
    or warn "Warning: Can't locate your perl binary";

  while (my ($k,$v) = each %Config) {
    $self->{config}{$k} = $v unless exists $self->{config}{$k};
  }
  $self->{config}{cc} = $ENV{CC} if defined $ENV{CC};
  $self->{config}{ccflags} = $ENV{CFLAGS} if defined $ENV{CFLAGS};
  $self->{config}{cxx} = $ENV{CXX} if defined $ENV{CXX};
  $self->{config}{cxxflags} = $ENV{CXXFLAGS} if defined $ENV{CXXFLAGS};
  $self->{config}{ld} = $ENV{LD} if defined $ENV{LD};
  $self->{config}{ldflags} = $ENV{LDFLAGS} if defined $ENV{LDFLAGS};

  unless ( exists $self->{config}{cxx} ) {
    my ($ccpath, $ccbase, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/);
    foreach my $cxx (@{$cc2cxx{$ccbase}}) {
      if( can_run( File::Spec->catfile( $ccpath, $cxx, $ccsfx ) ) ) {
        $self->{config}{cxx} = File::Spec->catfile( $ccpath, $cxx, $ccsfx );
	last;
      }
      if( can_run( File::Spec->catfile( $cxx, $ccsfx ) ) ) {
        $self->{config}{cxx} = File::Spec->catfile( $cxx, $ccsfx );



( run in 0.674 second using v1.01-cache-2.11-cpan-8d75d55dd25 )