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

📄 ch14.025_best_ex14.6

📁 Perl Best Practices the source code
💻 6
字号:
################################################################################   Example 14.6 (Recommended) from Chapter 14 of "Perl Best Practices"    ####     Copyright (c) O'Reilly & Associates, 2005. All Rights Reserved.      ####  See: http://www.oreilly.com/pub/a/oreilly/ask_tim/2001/codepolicy.html  #################################################################################  Example 14-6. Standard interface components for Getopt::Clade#  Example 14-7. Standardized command-line parsing via Getopt::Clade# Standard modules...use strict;use warnings;use IO::Prompt;use Carp;use English qw( -no_match_vars );use Data::Alias;package Corporate::Std::Cmdline;use strict;use warnings;# line 1 Cmdline.pmuse Getopt::Clade <<'END_ARGS';    -i[n]  [=] <file:in>    Specify input file  [default: '-']    -o[ut] [=] <file:out>   Specify output file [default: '-']    -v                      Print all warnings    --verbose               [ditto]END_ARGS1;  # magic true value required at the end of every module# line 1 demo.plpackage main;# use Corporate::Std::Cmdline plus => <<'END_ARGS';Corporate::Std::Cmdline->import( plus => <<'END_ARGS');    -l[en] [=] <l:+int>     Display length [default: 24 ]    -w[id] [=] <w:+int>     Display width  [default: 78 ]END_ARGS# Report intended behaviour...if ($ARGV{-v}) {    print "Loading first $ARGV{'-l'} chunks of file: $ARGV{'-i'}\n"}# etc.

⌨️ 快捷键说明

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