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

📄 prototype.t

📁 source of perl for linux application,
💻 T
字号:
#!/usr/bin/perluse lib '..';use Memoize;$EXPECTED_WARNING = '(no warning expected)';print "1..4\n";sub q1 ($) { $_[0] + 1 }sub q2 ()  { time }sub q3     { join "--", @_ }$SIG{__WARN__} = \&handle_warnings;$RES = 'ok';memoize 'q1';print "$RES 1\n";$RES = 'ok';memoize 'q2';print "$RES 2\n";$RES = 'ok';memoize 'q3';print "$RES 3\n";# Let's see if the prototype is actually honored@q = (1..5);$r = q1(@q); print (($r == 6) ? '' : 'not ', "ok 4\n");sub handle_warnings {  print $_[0];  $RES = 'not ok' unless $_[0] eq $EXPECTED_WARNING;}

⌨️ 快捷键说明

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