📄 commandline.pm
字号:
# vim:ts=4 sw=4# ----------------------------------------------------------------------------------------------------# Name : ETL::Pequel3::CommandLine.pm# Created : 2 May 2006# Author : Mario Gaffiero (gaffie)## Copyright 1999-2007 Mario Gaffiero.# # This file is part of Pequel(TM).# # Pequel is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; version 2 of the License.# # Pequel is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.# # You should have received a copy of the GNU General Public License# along with Pequel; if not, write to the Free Software# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA# ----------------------------------------------------------------------------------------------------# Modification History# When Version Who What# ----------------------------------------------------------------------------------------------------package ETL::Pequel3::CommandLine;require 5.005_62;use strict;use warnings;use stl;# ----------------------------------------------------------------------------------------------------{ package ETL::Pequel3::CommandLine; use base qw(Class::STL::Element); use Class::STL::ClassMembers qw( err POM getopt ); use Class::STL::ClassMembers::Constructor; sub new_extra { my $self = shift; use ETL::Pequel3::Error; $self->err(ETL::Pequel3::Error->new()); $self->getopt(ETL::Pequel3::GetOpt->new(@_ == 0 && @ARGV == 0 ? ('--usage') : (@_)));#< }#< sub main#< {#< my $self = shift;#< use ETL::Pequel3::GetOpt;#< $self->getopt()->get_options(@_ == 0 && @ARGV == 0 ? ('--usage') : (@_)); use ETL::Pequel3::User; $self->POM(ETL::Pequel3::User->new( $self->getopt()->user()->exists('script_filename') ? (script_filename => $self->getopt()->user()->script_filename()) : () )); if ($self->getopt()->user()->exists('script_filename')) { $self->POM()->produce(); $self->POM()->execute() unless ( $self->getopt()->user()->exists('noexec') && $self->getopt()->user()->noexec() != 0 ); } else { #NOTE: still need to do this for options like catgen...#< $self->getopt()->prep_options($self->POM()); $self->getopt()->exec_options($self->POM()); } return $self; }}# ----------------------------------------------------------------------------------------------------1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -