App-Stow-Check

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
        while ( $call eq __PACKAGE__ ) {
                $depth++;
                $call = caller($depth);
        }
        return $call;
}
 
sub _read {
        local *FH;
        open( FH, '<', $_[0] ) or die "open($_[0]): $!";
        binmode FH;
        my $string = do { local $/; <FH> };
        close FH or die "close($_[0]): $!";
        return $string;
}
 
sub _readperl {
        my $string = Module::Install::_read($_[0]);
        $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg;
        $string =~ s/(\n)\n*__(?:DATA|END)__\b.*\z/$1/s;
        $string =~ s/\n\n=\w+.+?\n\n=cut\b.+?\n+/\n\n/sg;

inc/Module/Install.pm  view on Meta::CPAN

399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
        $string =~ s/(^|\n=cut\b.+?\n+)[^=\s].+?\n(\n=\w+|\z)/$1$2/sg;
        $string =~ s/\n*=pod\b[^\n]*\n+/\n\n/sg;
        $string =~ s/\n*=cut\b[^\n]*\n+/\n\n/sg;
        $string =~ s/^\n+//s;
        return $string;
}
 
sub _write {
        local *FH;
        open( FH, '>', $_[0] ) or die "open($_[0]): $!";
        binmode FH;
        foreach ( 1 .. $#_ ) {
                print FH $_[$_] or die "print($_[0]): $!";
        }
        close FH or die "close($_[0]): $!";
}
 
# _version is for processing module versions (eg, 1.03_05) not
# Perl versions (eg, 5.8.1).
sub _version {
        my $s = shift || 0;

inc/Module/Install/Can.pm  view on Meta::CPAN

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
                # No working C compiler
                return 0;
        }
 
        # Write a C file representative of what XS becomes
        require File::Temp;
        my ( $FH, $tmpfile ) = File::Temp::tempfile(
                "compilexs-XXXXX",
                SUFFIX => '.c',
        );
        binmode $FH;
        print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
 
int main(int argc, char **argv) {
    return 0;
}
 
int boot_sanexs() {



( run in 0.299 second using v1.01-cache-2.11-cpan-0d8aa00de5b )