Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.366.104 Times

MooseX::Getopt 0.20

Company: Ricardo Signes
Date Added: November 11, 2013  |  Visits: 326

MooseX::Getopt

Report Broken Link
Printer Friendly Version


Product Homepage
Download (37 downloads)



MooseX::Getopt is a role which provides an alternate constructor for creating objects using parameters passed in from the command line.<br /><br />This module attempts to DWIM as much as possible with the command line params by introspecting your class's attributes. It will use the name of your attribute as the command line option, and if there is a type constraint defined, it will configure Getopt::Long to handle the option accordingly.<br /><br />You can use the trait MooseX::Getopt::Meta::Attribute::Trait or the attribute metaclass MooseX::Getopt::Meta::Attribute to get non-default commandline option names and aliases.<br /><br />You can use the trait MooseX::Getopt::Meta::Attribute::Trait::NoGetopt or the attribute metaclass MooseX::Getopt::Meta::Attribute::NoGetopt to have MooseX::Getopt ignore your attribute in the commandline options.<br /><br />By default, attributes which start with an underscore are not given commandline argument support, unless the attribute's metaclass is set to MooseX::Getopt::Meta::Attribute. If you don't want you accessors to have the leading underscore in thier name, you can do this:<br /><br /> # for read/write attributes<br /> has '_foo' => (accessor => 'foo', ...);<br /><br /> # or for read-only attributes<br /> has '_bar' => (reader => 'bar', ...);<br /><br />This will mean that Getopt will not handle a --foo param, but your code can still call the foo method.<br /><br />If your class also uses a configfile-loading role based on MooseX::ConfigFromFile, such as MooseX::SimpleConfig, MooseX::Getopt's new_with_options will load the configfile specified by the --configfile option (or the default you've given for the configfile attribute) for you.<br /><br />Options specified in multiple places follow the following precendence order: commandline overrides configfile, which overrides explicit new_with_options parameters.<br /><br />SYNOPSIS<br /><br /> ## In your class<br /> package My::App;<br /> use Moose;<br /><br /> with 'MooseX::Getopt';<br /><br /> has 'out' => (is => 'rw', isa => 'Str', required => 1);<br /> has 'in' => (is => 'rw', isa => 'Str', required => 1);<br /><br /> # ... rest of the class here<br /><br /> ## in your script<br /> #!/usr/bin/perl<br /><br /> use My::App;<br /><br /> my $app = My::App->new_with_options();<br /> # ... rest of the script here<br /><br /> ## on the command line<br /> % perl my_app_script.pl -in file.input -out file.dump<br />

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Attribute Attributes Class Command Commandline Configfile Default Handle Metaclass Moosexgetopt Moosexgetopt 0 20 Myapp Option Overrides Trait
Users rating: 0/10

License: Freeware Size: 30.72 KB
USER REVIEWS
More Reviews or Write Review


MOOSEX::GETOPT RELATED
Network & Internet  -  XSwallow 1.0.18
XSwallow is a generic plugin for netscape 3 and netscape 4 that allows any X program or command line utility to handle embedded mimetypes in webpages, e.g vrml/mpeg/wav etc. So a mime type like vrml for which there does not exist, as of the...
50.18 KB  
MP3 Tools  -  Wave Swiss Knife 1.0
Offer a low-level command-line interface to handle PCM Wave files of any sample rate and bit depths. Provide useful tools such as noise gate, signal generators, FFT and statistical analyzises, DC correction. Plugin architecture easy to extend.
61.5 KB  
Libraries  -  File::lockf 0.20
File::lockf is a Perl module interface to the lockf system call. SYNOPSIS use File::lockf; File-Lockf is an interface to the lockf system call. Perl supports the flock system call natively, but that does not acquire network locks. Perl also...
3.07 KB  
Libraries  -  Class::Declare::Attributes 0.04
Class::Declare::Attributes is a Perl module with Class::Declare method types using Perl attributes. SYNOPSIS package My::Class; use 5.006; use strict; use warnings; use base qw( Class::Declare::Attributes ); # declare the...
21.5 KB  
Libraries  -  Class::Meta::Declare 0.04
Class::Meta::Declare is a Perl module deprecated in favor of Class::Meta::Express. SYNOPSIS This was a first attempt at making a saner interface for Class::Meta. It is nicer, but Class::Meta::Express is nicer still. Go use that one. package...
15.36 KB  
Libraries  -  File::Attributes::Recursive 0.02
File::Attributes::Recursive module contains inherit file attributes from parent directories. SYNOPSIS Works like File::Attributes, but will recurse up the directory tree until a matching attribute is found. EXPORT None, by default. Specify...
25.6 KB  
HTML Utilities  -  django-reporter 0.1
Django-reporter A Django application to create automated email reports in .csv format. It includes a management command that is intended to be invoked periocically from cron. Installation To install: pip...
10.24 KB  
Database Tools  -  Liste Class 1.0
Liste Class can be used to generate form select inputs from the results of MySQL database queries.Features of Liste Class:- Generate the HTML for select inputs from separate definition PHP scripts- Option to make a given option the default...
20.48 KB  
Libraries  -  Puppet::Body 1.018
Puppet::Body provides an utility class to handle has-a relations and logs. Puppet::Body is a utility class that is used (and not inherited like the deprecated Puppet::Any) to manage dynamic has-a relations between objects..
7.17 KB  
Libraries  -  argstream 1.0
argstream is a class that facilitates easy parsing of command line arguments in C++. The syntax is very simple and uses stream operators to parse various types of arguments. Here is a list of functionalities offered for the parsing of command...
 
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB