⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hints.t

📁 source of perl for linux application,
💻 T
字号:
#!/usr/bin/perl -wBEGIN {    if( $ENV{PERL_CORE} ) {        chdir 't';        @INC = ('../lib', 'lib/');    }    else {        unshift @INC, 't/lib/';    }}chdir 't';use File::Spec;use Test::More tests => 3;# Having the CWD in @INC masked a bug in finding hint filesmy $curdir = File::Spec->curdir;@INC = grep { $_ ne $curdir && $_ ne '.' } @INC;mkdir('hints', 0777);(my $os = $^O) =~ s/\./_/g;my $hint_file = File::Spec->catfile('hints', "$os.pl");open(HINT, ">$hint_file") || die "Can't write dummy hints file $hint_file: $!";print HINT <<'CLOO';$self->{CCFLAGS} = 'basset hounds got long ears';CLOOclose HINT;use TieOut;use ExtUtils::MakeMaker;my $out = tie *STDERR, 'TieOut';my $mm = bless {}, 'ExtUtils::MakeMaker';$mm->check_hints;is( $mm->{CCFLAGS}, 'basset hounds got long ears' );is( $out->read, "Processing hints file $hint_file\n" );open(HINT, ">$hint_file") || die "Can't write dummy hints file $hint_file: $!";print HINT <<'CLOO';die "Argh!\n";CLOOclose HINT;$mm->check_hints;is( $out->read, <<OUT, 'hint files produce errors' );Processing hints file $hint_fileArgh!OUTEND {    use File::Path;    rmtree ['hints'];}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -