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

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

Serving Software Downloads in 976 Categories, Downloaded 29.544.926 Times

MooseX::Getopt 0.20

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

MooseX::Getopt

Report Broken Link
Printer Friendly Version


Product Homepage
Download (16 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  
Sports  -  CHGKounter 1.0
CHGKounter is app for training and competition in What? Where? When?. The application tracks time and performs standard command such as Ten seconds, Answers. 60, 30 and 20 seconds mode for different types of questions. Commands can be spoken...
1.6 MB  
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  
Programming  -  Package::Generator 0.103
Package::Generator is a Perl module that lets you quickly and easily construct new packages. It gives them unused names and sets up their package data, if provided. SYNOPSIS use Package::Generator; my $package =...
30.72 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  
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  
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  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
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  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB