Fry-Shell

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

                These tests are then applied to a command's defined argument(s).
                With defined argument types, one can also define autocompletion
                routines for a command's arguments.
        - Options can modify variables.
                Since variables exist for almost every aspect of the shell, options
                can change many core shell functions. A handy example is 'parsecmd'
                which names the current parse subroutine for the current line.
                Changing this var would change how the input after the options is
                parsed.
        - Options can have different behaviors defined including the ability to invoke
                subroutines when called or to maintain a value for a specified amount of iterations. 
        - Default options include 'menu' which numbers output and allows the next command to
        reference them by number.
        - Page output with preferred pager.
        - Multiline mode.
        - Comes with a decent default library,Fry::Lib::Default, to dump,list or
                unload any shell component, run system commands,evaluate perl statements
                and execute methods of autoloaded libraries.
FAQ
	What are some good uses for this module?
		- Making a shell around different modules by loading libraries.

lib/Fry/Opt.pm  view on Meta::CPAN

	a($): Option alias.
	tags($): Contains a value which modifies an option's behavior. Only defined value is 'counter' which sets 
		an active option's stop value.
	value($): Can contain an option's value. Currently only options' with no type store their value here.
	*type($): Indicates where an option gets/sets its value. Currently can be one of three: flag,var,none. 'none' is the default.
		A flag type syncs it value with a shell flag. A var type syncs its value with a
		variable. A none type gets its value from the attribute value.
	action(\&): Given subroutine is called before a command for an active option.
		Subroutine is passed the shell object and the options' value set from the
		commandline. 
	stop($): Maintains an option's value for $stop + 1 loop iterations where $stop
		is this attribute's value. This gives an active option a timed noreset interval. Used mostly with menu option.
	noreset($): If set, the active option can't be reset (except for an overriding flag to &resetOptions).
	*default($): Default value that an option starts with and is set to whenever reset. Default value is 0.

=head1 PUBLIC METHODS

	Opt($opt): Returns an option's value.
	findSetOptions(): Returns hash of options that differ from their default
		values. Used when displaying the prompt.
	resetOptions(): Iterates through all options and resets them according to attributes.

lib/Fry/Shell.pm  view on Meta::CPAN

		These tests are then applied to a command's defined argument(s).
		With defined argument types, one can also define autocompletion
		routines for a command's arguments.
	- Options can modify variables.
		Since variables exist for almost every aspect of the shell, options
		can change many core shell functions. A handy example is 'parsecmd'
		which names the current parse subroutine for the current line.
		Changing this var would change how the input after the options is
		parsed.
	- Options can have different behaviors defined including the ability to invoke
		subroutines when called or to maintain a value for a specified amount of iterations. 
	- Default options include 'menu' which numbers output and allows the next command to
	reference them by number.
	- Page output with preferred pager.
	- Multiline mode.
	- Comes with a decent default library,Fry::Lib::Default, to dump,list or
		unload any shell component, run system commands,evaluate perl statements
		and execute methods of autoloaded libraries.

=head2 NOTE



( run in 0.977 second using v1.01-cache-2.11-cpan-71847e10f99 )