arg
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 55
Argv 1.19
Argv is a Perl module that provides an OO interface to an arg vector. more>>
Argv is a Perl module that provides an OO interface to an arg vector.
SYNOPSIS
use Argv;
# A roundabout way of getting perls version.
my $pl = Argv->new(qw(perl -v));
$pl->exec;
# Run /bin/cat, showing how to provide "predigested" options.
Argv->new(/bin/cat, [qw(-u -n)], @ARGV)->system;
# A roundabout way of globbing.
my $echo = Argv->new(qw(echo M*));
$echo->glob;
my $globbed = $echo->qx;
print "echo M* globs to: $globbed";
# A demonstration of head-like behavior (aborting early)
my $maxLinesToPrint = 5;
my $callback = sub {
print shift;
return !(--$maxLinesToPrint);
};
my $head = Argv->new(ls, [qw(-l -a)]);
$head->readonly("yes");
$head->pipe($callback);
# A demonstration of the builtin xargs-like behavior.
my @files = split(/s+/, $globbed);
my $ls = Argv->new(qw(ls -d -l), @files);
$ls->parse(qw(d l));
$ls->dbglevel(1);
$ls->qxargs(1);
my @long = $ls->qx;
$ls->dbglevel(0);
print @long;
# A demonstration of how to use option sets in a wrapper program.
@ARGV = qw(Who -a -y foo -r); # hack up an @ARGV
my $who = Argv->new(@ARGV); # instantiate
$who->dbglevel(1); # set verbosity
$who->optset(qw(UNAME FOO WHO)); # define 3 option sets
$who->parseUNAME(qw(a m n p)); # parse these to set UNAME
$who->parseFOO(qw(y=s z)); # parse -y and -z to FOO
$who->parseWHO(r); # for the who cmd
warn "got -y flag in option set FOOn" if $who->flagFOO(y);
print Argv->new(uname, $who->optsUNAME)->qx;
$who->prog(lc $who->prog); # force $0 to lower case
$who->exec(qw(WHO)); # exec the who cmd
<<lessSYNOPSIS
use Argv;
# A roundabout way of getting perls version.
my $pl = Argv->new(qw(perl -v));
$pl->exec;
# Run /bin/cat, showing how to provide "predigested" options.
Argv->new(/bin/cat, [qw(-u -n)], @ARGV)->system;
# A roundabout way of globbing.
my $echo = Argv->new(qw(echo M*));
$echo->glob;
my $globbed = $echo->qx;
print "echo M* globs to: $globbed";
# A demonstration of head-like behavior (aborting early)
my $maxLinesToPrint = 5;
my $callback = sub {
print shift;
return !(--$maxLinesToPrint);
};
my $head = Argv->new(ls, [qw(-l -a)]);
$head->readonly("yes");
$head->pipe($callback);
# A demonstration of the builtin xargs-like behavior.
my @files = split(/s+/, $globbed);
my $ls = Argv->new(qw(ls -d -l), @files);
$ls->parse(qw(d l));
$ls->dbglevel(1);
$ls->qxargs(1);
my @long = $ls->qx;
$ls->dbglevel(0);
print @long;
# A demonstration of how to use option sets in a wrapper program.
@ARGV = qw(Who -a -y foo -r); # hack up an @ARGV
my $who = Argv->new(@ARGV); # instantiate
$who->dbglevel(1); # set verbosity
$who->optset(qw(UNAME FOO WHO)); # define 3 option sets
$who->parseUNAME(qw(a m n p)); # parse these to set UNAME
$who->parseFOO(qw(y=s z)); # parse -y and -z to FOO
$who->parseWHO(r); # for the who cmd
warn "got -y flag in option set FOOn" if $who->flagFOO(y);
print Argv->new(uname, $who->optsUNAME)->qx;
$who->prog(lc $who->prog); # force $0 to lower case
$who->exec(qw(WHO)); # exec the who cmd
Download (0.043MB)
Added: 2007-05-10 License: Perl Artistic License Price:
898 downloads
Argparse 1.0
The argparse module improves on the standard library optparse module in a number of ways, more>>
Argparse 1.0 is an effective software which provides an easy, declarative interface for creating command line tools. The argparse module improves on the standard library optparse module in a number of ways,
Major Features:
- Parse the arguments and flags from sys.argv
- Convert arg strings into objects for your program
- Format and print informative help messages and much more...
- Handling positional arguments
- Supporting sub-commands
- Allowing alternative option prefixes like + and /
- Handling zero-or-more and one-or-more style arguments
- Producing more informative usage messages
- Providing a much simpler interface for custom types and actions
Added: 2009-07-26 License: The Apache License 2.0 Price: FREE
downloads
WML::Card 0.02
WML::Card is a Perl extension for builiding WML Cards according to the browser being used. more>>
WML::Card is a Perl extension for builiding WML Cards according to the browser being used.
SYNOPSIS
use WML::Card;
my $options= [ [Option 1, http://...], [Option 2, http://...], ];
my $c = WML::Card->guess(index,Wap Site); $c->link_list(indice, undef, 0, $options, $options); $c->print;
This perl library simplifies the creation of WML cards on the fly. It produces the most suitable wml code for the browser requesting the card. In this way the one building the cards does not have to worry about the differences in how each wap browser displays the wml code. In combination wht WML::Deck it provides functionality to build WAP applications.
Methods
$card = WML::Card->guess( $id, $title, [$user_agent] );
This class method constructs a new WML::Card object. The first argument defines the WML cards id and the second argument its title. The if the third argument is not defined, the value is obtained from $ENV{HTTP_USER_AGENT}.
$c->buttons($label, $type, $task, $href)
$c->table ($data, $title, $offset, $pager, @headers)
$c->link_list($name, $listtitle, $offset, $pager, $data, $align)
$c->value_list($name, $listtitle, $offset,$pager,$data)
The variable $data is an array reference like: my $menu_items= [ [Option 1, http://...], [Option 2, http://...], ];
The variable $pager is the number of items wanted to be displayed in each card.
$c->print
$c->info($content)
$c->img($file, $alt)
$c->input($label, $text, $name, $format, $type, $size, $target, $arg);
$c->link($target, $text);
$c->br
<<lessSYNOPSIS
use WML::Card;
my $options= [ [Option 1, http://...], [Option 2, http://...], ];
my $c = WML::Card->guess(index,Wap Site); $c->link_list(indice, undef, 0, $options, $options); $c->print;
This perl library simplifies the creation of WML cards on the fly. It produces the most suitable wml code for the browser requesting the card. In this way the one building the cards does not have to worry about the differences in how each wap browser displays the wml code. In combination wht WML::Deck it provides functionality to build WAP applications.
Methods
$card = WML::Card->guess( $id, $title, [$user_agent] );
This class method constructs a new WML::Card object. The first argument defines the WML cards id and the second argument its title. The if the third argument is not defined, the value is obtained from $ENV{HTTP_USER_AGENT}.
$c->buttons($label, $type, $task, $href)
$c->table ($data, $title, $offset, $pager, @headers)
$c->link_list($name, $listtitle, $offset, $pager, $data, $align)
$c->value_list($name, $listtitle, $offset,$pager,$data)
The variable $data is an array reference like: my $menu_items= [ [Option 1, http://...], [Option 2, http://...], ];
The variable $pager is the number of items wanted to be displayed in each card.
$c->print
$c->info($content)
$c->img($file, $alt)
$c->input($label, $text, $name, $format, $type, $size, $target, $arg);
$c->link($target, $text);
$c->br
Download (0.005MB)
Added: 2007-03-26 License: Perl Artistic License Price:
942 downloads
TangoCMS 2.3.1
TangoCMS offers you many features that help speed up the work flow of creating, and managing, a website that suits your needs. Were focused on bringing you a high quality feature set to ensure you always have latest technologies available to use. more>>
TangoCMS 2.3.1 is a useful system whose ease of use and powerful feature set allows you to quickly and easily create and manage an entire website.
TangoCMS offers many Features to help you manage your website, publish content and speed up your work flow - including a powerful media module to display videos, pictures and audio files!
With an ever growing Community, you will always get the best support with any problems or questions you come across.
Major Features:
- Clean Interface: A unique clean interface not only makes TangoCMS look visually beautiful, it also makes it much easier to work in due to the simplicity of the different interface elements. The visual style can easily be changed through an ever growing selection of themes.
- Easy Content Layout: Both the Main site and AdminCP are easily configurable in terms of content layout, meaning you can choose where things should be to create the perfect environment to work in, and control what content is displayed to your users.
- Flexible Permissions and User Group Management: ACL, Access Control Levels, allows you to fine tune what groups of users have permission to certain content. This allows you to create a powerful structure of content which can be restricted to the different groups. Groups can inherit permissions from each other, allowing you to create an unbeatable chain of permissions.
- Media: Easily upload and share Images, Video and Audio for others to view and leave comments on. Media items can also be added from externals sources, such as YouTube. All Video and Audio files are played through the beautiful FlowPlayer project.
- Open Source: All of TangoCMS is released under open sources licenses, meaning you can modify the code in any way you wish (keeping within the terms of the licenses) - increasing what you can do with TangoCMS to how well you can program!
- RSS Feeds: Generates correctly formatted RSS feeds for your viewers to subscribe to, allowing them to be kept up to date on your websites content.
- Standard Compliant: Your website will be valid and helps ensure forward compatibility with future technologies.
- Update Notifier: Your TangoCMS installation will notify you when a new release is available, helping to ensure you'll always have the latest security and bug fixes as well as feature improvements.
- URL Aliases: Control the structure of your websites URLs by aliases easily and quickly. Alias longer URLs such as 'page/index/about' to a much shorter and human readable 'about'.
- General Features
- Complete Feature Set: TangoCMS is shipped with a complete feature set, allowing you to start creating from the moment it is installed.
- Different Editor Formats: By default, TangoCMS uses MediaWiki Formatting, with the help of a GUI editor. However for those not comfortable with MediaWiki formatting, there is also HTML or PlainText to choose from.
- Easy User Registration: Users can register for an account (if you allow for it) which could allow them to access different content that is otherwise denied to guest users. You can control how users are validated, between Admin Approval, E-Mail Confirmation, or quite simply no conformation.
Enhancements:
- #154: Installer doesn't check if './tmp' subdirectories are writable
- #155: Installer Cappuccino theme needs polish/fixes
- #156: Menu item URL '/' does not link to frontpage
- #157: Article part picker URL, query string is encoded
- #158: Display/Force title does not effect frontpage/requested module
- #159: Pagination URL is incorrect at URL '/admin'
- #160: WYSIWYG Editor styles need improving
- #162: Only modules in SC should use pagination page arg
- #163: '+' char is allowed in URL, causes 404 error
- #166: Possible login redirection loop
Requirements:
- PHP 5.2.0 or greater
- MySQL 4.1 or greater (recommended MySQL 5)
- Webserver - Tested on Apache & Lighttpd (recommended mod_rewrite for SEF, Search Engine Friendly, URLs)
Added: 2009-07-26 License: GPL Price: FREE
downloads
VTKImaging 4.0.001
VTKImaging is a Perl interface to VTKImaging library. more>>
VTKImaging is a Perl interface to VTKImaging library.
Graphics::VTK::BooleanTexture
Inherits from StructuredPointsSource
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
const char *GetClassName ();
unsigned char *GetInIn ();
(Returns a 2-element Perl list)
unsigned char *GetInOn ();
(Returns a 2-element Perl list)
unsigned char *GetInOut ();
(Returns a 2-element Perl list)
unsigned char *GetOnIn ();
(Returns a 2-element Perl list)
unsigned char *GetOnOn ();
(Returns a 2-element Perl list)
unsigned char *GetOnOut ();
(Returns a 2-element Perl list)
unsigned char *GetOutIn ();
(Returns a 2-element Perl list)
unsigned char *GetOutOn ();
(Returns a 2-element Perl list)
unsigned char *GetOutOut ();
(Returns a 2-element Perl list)
int GetThickness ();
int GetXSize ();
int GetYSize ();
vtkBooleanTexture *New ();
void SetInIn (unsigned char , unsigned char );
void SetInOn (unsigned char , unsigned char );
void SetInOut (unsigned char , unsigned char );
void SetOnIn (unsigned char , unsigned char );
void SetOnOn (unsigned char , unsigned char );
void SetOnOut (unsigned char , unsigned char );
void SetOutIn (unsigned char , unsigned char );
void SetOutOn (unsigned char , unsigned char );
void SetOutOut (unsigned char , unsigned char );
void SetThickness (int );
void SetXSize (int );
void SetYSize (int );
vtkBooleanTexture Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet
void SetInIn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetInOn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetInOut (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOnIn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOnOn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOnOut (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOutIn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOutOn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOutOut (unsigned char a[2]);
Arg types of unsigned char * not supported yet
<<lessGraphics::VTK::BooleanTexture
Inherits from StructuredPointsSource
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
const char *GetClassName ();
unsigned char *GetInIn ();
(Returns a 2-element Perl list)
unsigned char *GetInOn ();
(Returns a 2-element Perl list)
unsigned char *GetInOut ();
(Returns a 2-element Perl list)
unsigned char *GetOnIn ();
(Returns a 2-element Perl list)
unsigned char *GetOnOn ();
(Returns a 2-element Perl list)
unsigned char *GetOnOut ();
(Returns a 2-element Perl list)
unsigned char *GetOutIn ();
(Returns a 2-element Perl list)
unsigned char *GetOutOn ();
(Returns a 2-element Perl list)
unsigned char *GetOutOut ();
(Returns a 2-element Perl list)
int GetThickness ();
int GetXSize ();
int GetYSize ();
vtkBooleanTexture *New ();
void SetInIn (unsigned char , unsigned char );
void SetInOn (unsigned char , unsigned char );
void SetInOut (unsigned char , unsigned char );
void SetOnIn (unsigned char , unsigned char );
void SetOnOn (unsigned char , unsigned char );
void SetOnOut (unsigned char , unsigned char );
void SetOutIn (unsigned char , unsigned char );
void SetOutOn (unsigned char , unsigned char );
void SetOutOut (unsigned char , unsigned char );
void SetThickness (int );
void SetXSize (int );
void SetYSize (int );
vtkBooleanTexture Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet
void SetInIn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetInOn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetInOut (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOnIn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOnOn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOnOut (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOutIn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOutOn (unsigned char a[2]);
Arg types of unsigned char * not supported yet
void SetOutOut (unsigned char a[2]);
Arg types of unsigned char * not supported yet
Download (0.66MB)
Added: 2007-07-19 License: Perl Artistic License Price:
827 downloads
VTKRendering 4.0.001
VTKRendering is a Perl interface to VTKRendering library. more>>
VTKRendering is a Perl interface to VTKRendering library.
Graphics::VTK::OpenGLRenderWindow
Inherits from RenderWindow
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
const char *GetClassName ();
int GetDepthBufferSize ();
static int GetGlobalMaximumNumberOfMultiSamples ();
int GetMultiSamples ();
void MakeCurrent () = 0;
virtual void OpenGLInit ();
void RegisterTextureResource (GLuint id);
static void SetGlobalMaximumNumberOfMultiSamples (int val);
void SetMultiSamples (int );
virtual void StereoUpdate ();
vtkOpenGLRenderWindow Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
virtual unsigned char *GetPixelData (int x, int y, int x2, int y2, int front);
Cant Handle unsigned char * return type without a hint
virtual unsigned char *GetRGBACharPixelData (int x, int y, int x2, int y2, int front);
Cant Handle unsigned char * return type without a hint
virtual float *GetRGBAPixelData (int x, int y, int x2, int y2, int front);
Cant Handle float * return type without a hint
virtual float *GetZbufferData (int x1, int y1, int x2, int y2);
Cant Handle float * return type without a hint
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet
virtual void ReleaseRGBAPixelData (float *data);
Dont know the size of pointer arg number 1
virtual void SetPixelData (int x, int y, int x2, int y2, unsigned char *, int front);
Dont know the size of pointer arg number 5
virtual void SetRGBACharPixelData (int x, int y, int x2, int y2, unsigned char *, int front, int blend);
Dont know the size of pointer arg number 5
virtual void SetRGBAPixelData (int x, int y, int x2, int y2, float *, int front, int blend);
Dont know the size of pointer arg number 5
virtual void SetZbufferData (int x1, int y1, int x2, int y2, float *buffer);
Dont know the size of pointer arg number 5
Graphics::VTK::AbstractMapper3D
Inherits from AbstractMapper
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
virtual float *GetBounds () = 0;
(Returns a 6-element Perl list)
float *GetCenter ();
(Returns a 3-element Perl list)
const char *GetClassName ();
float GetLength ();
virtual int IsARayCastMapper ();
virtual int IsARenderIntoImageMapper ();
virtual void Update () = 0;
vtkAbstractMapper3D Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
virtual void GetBounds (float bounds[6]);
Cant handle methods with single array args (like a[3]) in overloaded methods yet.
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet
Graphics::VTK::AbstractPicker
Inherits from Object
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
void AddPickList (vtkProp *);
void DeletePickList (vtkProp *);
const char *GetClassName ();
int GetPickFromList ();
vtkPropCollection *GetPickList ();
float *GetPickPosition ();
(Returns a 3-element Perl list)
vtkRenderer *GetRenderer ();
float *GetSelectionPoint ();
(Returns a 3-element Perl list)
void InitializePickList ();
virtual int Pick (float selectionX, float selectionY, float selectionZ, vtkRenderer *renderer) = 0;
void PickFromListOff ();
void PickFromListOn ();
void SetEndPickMethod (void (*func)(void *) , void *arg);
void SetPickFromList (int );
void SetPickMethod (void (*func)(void *) , void *arg);
void SetStartPickMethod (void (*func)(void *) , void *arg);
vtkAbstractPicker Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
int Pick (float selectionPt[3], vtkRenderer *ren);
Dont know the size of pointer arg number 1
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet
void SetEndPickMethodArgDelete (void (*func)(void *) );
No TCL interface is provided by VTK, so we arent going to provide one either.
void SetPickMethodArgDelete (void (*func)(void *) );
No TCL interface is provided by VTK, so we arent going to provide one either.
void SetStartPickMethodArgDelete (void (*func)(void *) );
No TCL interface is provided by VTK, so we arent going to provide one either.
<<lessGraphics::VTK::OpenGLRenderWindow
Inherits from RenderWindow
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
const char *GetClassName ();
int GetDepthBufferSize ();
static int GetGlobalMaximumNumberOfMultiSamples ();
int GetMultiSamples ();
void MakeCurrent () = 0;
virtual void OpenGLInit ();
void RegisterTextureResource (GLuint id);
static void SetGlobalMaximumNumberOfMultiSamples (int val);
void SetMultiSamples (int );
virtual void StereoUpdate ();
vtkOpenGLRenderWindow Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
virtual unsigned char *GetPixelData (int x, int y, int x2, int y2, int front);
Cant Handle unsigned char * return type without a hint
virtual unsigned char *GetRGBACharPixelData (int x, int y, int x2, int y2, int front);
Cant Handle unsigned char * return type without a hint
virtual float *GetRGBAPixelData (int x, int y, int x2, int y2, int front);
Cant Handle float * return type without a hint
virtual float *GetZbufferData (int x1, int y1, int x2, int y2);
Cant Handle float * return type without a hint
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet
virtual void ReleaseRGBAPixelData (float *data);
Dont know the size of pointer arg number 1
virtual void SetPixelData (int x, int y, int x2, int y2, unsigned char *, int front);
Dont know the size of pointer arg number 5
virtual void SetRGBACharPixelData (int x, int y, int x2, int y2, unsigned char *, int front, int blend);
Dont know the size of pointer arg number 5
virtual void SetRGBAPixelData (int x, int y, int x2, int y2, float *, int front, int blend);
Dont know the size of pointer arg number 5
virtual void SetZbufferData (int x1, int y1, int x2, int y2, float *buffer);
Dont know the size of pointer arg number 5
Graphics::VTK::AbstractMapper3D
Inherits from AbstractMapper
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
virtual float *GetBounds () = 0;
(Returns a 6-element Perl list)
float *GetCenter ();
(Returns a 3-element Perl list)
const char *GetClassName ();
float GetLength ();
virtual int IsARayCastMapper ();
virtual int IsARenderIntoImageMapper ();
virtual void Update () = 0;
vtkAbstractMapper3D Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
virtual void GetBounds (float bounds[6]);
Cant handle methods with single array args (like a[3]) in overloaded methods yet.
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet
Graphics::VTK::AbstractPicker
Inherits from Object
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
void AddPickList (vtkProp *);
void DeletePickList (vtkProp *);
const char *GetClassName ();
int GetPickFromList ();
vtkPropCollection *GetPickList ();
float *GetPickPosition ();
(Returns a 3-element Perl list)
vtkRenderer *GetRenderer ();
float *GetSelectionPoint ();
(Returns a 3-element Perl list)
void InitializePickList ();
virtual int Pick (float selectionX, float selectionY, float selectionZ, vtkRenderer *renderer) = 0;
void PickFromListOff ();
void PickFromListOn ();
void SetEndPickMethod (void (*func)(void *) , void *arg);
void SetPickFromList (int );
void SetPickMethod (void (*func)(void *) , void *arg);
void SetStartPickMethod (void (*func)(void *) , void *arg);
vtkAbstractPicker Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
int Pick (float selectionPt[3], vtkRenderer *ren);
Dont know the size of pointer arg number 1
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet
void SetEndPickMethodArgDelete (void (*func)(void *) );
No TCL interface is provided by VTK, so we arent going to provide one either.
void SetPickMethodArgDelete (void (*func)(void *) );
No TCL interface is provided by VTK, so we arent going to provide one either.
void SetStartPickMethodArgDelete (void (*func)(void *) );
No TCL interface is provided by VTK, so we arent going to provide one either.
Download (0.66MB)
Added: 2007-07-17 License: Perl Artistic License Price:
829 downloads
Devel::CallerItem 1.0
Devel::CallerItem is an Perl object representing a function call from the stack of function calls. more>>
Devel::CallerItem is an Perl object representing a function call from the stack of function calls.
SYNOPSIS
Usage:
require Devel::CallerItem;
$call = Devel::CallerItem->from_depth($depth) || return;
$passed_arguments_ref = $call->argument_list_ref();
$callpack = $call->pack();
$callfile = $call->file();
$callline = $call->line();
$callsub = $call->subroutine();
$bool = $call->has_args();
$bool = $call->wants_array();
($arg_ref,@caller) = $call->as_array();
$call_string = $call->as_string($print_level);
$passed_arguments_string = $call->arguments_as_string();
$printable_arg = Devel::CallerItem->printable_arg($arg,$print_level);
Devel::CallerItem objects hold all the information about a specific function call on the stack. The information is basically that obtained from caller and @DB::args, packaged into an object. This comes with some useful methods to print the object in a nice way.
<<lessSYNOPSIS
Usage:
require Devel::CallerItem;
$call = Devel::CallerItem->from_depth($depth) || return;
$passed_arguments_ref = $call->argument_list_ref();
$callpack = $call->pack();
$callfile = $call->file();
$callline = $call->line();
$callsub = $call->subroutine();
$bool = $call->has_args();
$bool = $call->wants_array();
($arg_ref,@caller) = $call->as_array();
$call_string = $call->as_string($print_level);
$passed_arguments_string = $call->arguments_as_string();
$printable_arg = Devel::CallerItem->printable_arg($arg,$print_level);
Devel::CallerItem objects hold all the information about a specific function call on the stack. The information is basically that obtained from caller and @DB::args, packaged into an object. This comes with some useful methods to print the object in a nice way.
Download (0.004MB)
Added: 2007-05-01 License: Perl Artistic License Price:
908 downloads
Make 1.00
Make is a Perl module for processing makefiles. more>>
Make is a Perl module for processing makefiles.
SYNOPSIS
require Make;
my $make = Make->new(...);
$make->parse($file);
$make->Script(@ARGV)
$make->Make(@ARGV)
$make->Print(@ARGV)
my $targ = $make->Target($name);
$targ->colon([dependancy...],[command...]);
$targ->dolon([dependancy...],[command...]);
my @depends = $targ->colon->depend;
my @commands = $targ->colon->command;
Make->new creates an object if new(Makefile => $file) is specified then it is parsed. If not the usual makefile Makefile sequence is used. (If GNU => 1 is passed to new then GNUmakefile is looked for first.)
$make->Make(target...) makes the target(s) specified (or the first real target in the makefile).
$make->Print can be used to print to current selected stream a form of the makefile with all variables expanded.
$make->Script(target...) can be used to print to current selected stream the equivalent bourne shell script that a make would perform i.e. the output of make -n.
There are other methods (used by parse) which can be used to add and manipulate targets and their dependants. There is a hierarchy of classes which is still evolving. These classes and their methods will be documented when they are a little more stable.
The syntax of makefile accepted is reasonably generic, but I have not re-read any documentation yet, rather I have implemented my own mental model of how make works (then fixed it...).
In addition to traditional
.c.o :
$(CC) -c ...
GNU makes pattern rules e.g.
%.o : %.c
$(CC) -c ...
Likewise a subset of GNU makes $(function arg...) syntax is supported.
Via pmake Make has built perl/Tk from the MakeMaker generated Makefiles...
<<lessSYNOPSIS
require Make;
my $make = Make->new(...);
$make->parse($file);
$make->Script(@ARGV)
$make->Make(@ARGV)
$make->Print(@ARGV)
my $targ = $make->Target($name);
$targ->colon([dependancy...],[command...]);
$targ->dolon([dependancy...],[command...]);
my @depends = $targ->colon->depend;
my @commands = $targ->colon->command;
Make->new creates an object if new(Makefile => $file) is specified then it is parsed. If not the usual makefile Makefile sequence is used. (If GNU => 1 is passed to new then GNUmakefile is looked for first.)
$make->Make(target...) makes the target(s) specified (or the first real target in the makefile).
$make->Print can be used to print to current selected stream a form of the makefile with all variables expanded.
$make->Script(target...) can be used to print to current selected stream the equivalent bourne shell script that a make would perform i.e. the output of make -n.
There are other methods (used by parse) which can be used to add and manipulate targets and their dependants. There is a hierarchy of classes which is still evolving. These classes and their methods will be documented when they are a little more stable.
The syntax of makefile accepted is reasonably generic, but I have not re-read any documentation yet, rather I have implemented my own mental model of how make works (then fixed it...).
In addition to traditional
.c.o :
$(CC) -c ...
GNU makes pattern rules e.g.
%.o : %.c
$(CC) -c ...
Likewise a subset of GNU makes $(function arg...) syntax is supported.
Via pmake Make has built perl/Tk from the MakeMaker generated Makefiles...
Download (0.012MB)
Added: 2007-05-09 License: Perl Artistic License Price:
944 downloads
Nasal 1.0
Nasal is a simple, small, yet full-featured embeddable scripting language. more>>
Nasal is a language that I wrote for use in a personal project. Ostensibly it was because I was frustrated with the dearth of small-but-complete embeddable scripting languages, but of course I really wrote it because it was fun.
It is still young and incomplete in a few places, but is under active development and has been integrated as the extension language for the FlightGear simulator.
Documentation is still sparse. There is a design document available, which talks at length about the "whys" behind the design of Nasal and includes documentation for the built-in library functions.
More useful to the experienced programmer is the tutorial-style sample code, which explains and demonstrates all the syntax features of the language.
Like perl, python and javascript, nasal uses vectors (expandable arrays) and hash tables as its native data format. This is a well-understood idiom, and it works very well. I felt no need to rock the boat here.
Like perl, and unlike everything else, nasal combines numbers and strings into a single "scalar" datatype. No conversion needs to happen in user code, which simplifies common string handling tasks.
Like perl, but unlike python, hash keys must by scalars in nasal. Python supports a "tuple" constant type that can be used as well, but there is no equivalent in nasal (you cant use vectors as keys because they might change after the insertion).
Like perl and python, nasal uses a # character to indicate and end-of-line comment. There is no multiline begin/end comment syntax as in Javascript.
Like perl, nasal functions do not have named parameters. They get their arguments in a vector named "arg", and can extract them however they like. Unlike perl, Nasal takes advantage of this feature to do away with function "declaration" entirly; see below.
Like python, there is no hidden local object scope in a function call. The object on which a method was called is available to a function as a local variable named "me" (python calls this "self" by convention, but because nasal has no declared function arguments, there is no opportunity to change it).
Like perl, "objects" in nasal are simply hash tables. Looking an item up by name in a hash table and extracting a symbol for an object are just different syntax for the same operation (but read on for an important exception):
a["b"] = 1 means the same thing as: a.b = 1
The above paragraph is a minor lie. The "dot" syntax is also the clue to the interpreter to "save" the left hand side as the "me" reference if the expression is used as a function/method call. That is, these expressions are not equivalent (one is a plain function call, the other a method invocation on the object "a"):
a["b"](arg1, arg2) isnt the same as: a.b(arg1, arg2)
Like javascript, nasal lacks a specific "class" syntax for OOP programming. Instead, classes are simply objects. Each object supports a "parents" member array; symbol lookup on the object at runtime bounces to the parents (and the parents parents) if the symbol is not found in the hash. The parents field is just like any other object field, you can set it however you like and even change it at runtime if you are feeling especially perverse.
Like lisp, javascript and perl, nasal supports lexical closures. This means that the local symbol namespace available to your function when it is assigned remain constant over time. If you dont know what this means, you dont need to care. It is this feature that allows functions to use variables declared in the outer scope when it is defined (e.g. seeing "module" variables).
Like all other scripting languages, functions are just symbols in a namespace, but unlike all other scripting languages, there is no function "declaration" syntax. A function is always an anonymous object (a "lambda," in the parlance), which you assign to a variable in order to use. Like so:
myfunction = func { arg[0] + 1 }
myfunction(1); # returns 2
One annoyance of this feature is that Nasal functions dont have unique internal "names". So a debugging or exception stack trace can only give you a source line number, and not a function name as reference.
Nasal has a straightforward, readable syntax which is closest to javascript among other scripting languages. Like later versions of javascript, it includes has a hash lookup syntax as well as an object field accessor syntax (that is, you can do both a.b and a["b"]).
Unlike python, nasal has a grammar which is not whitespace-sensitive. This doesnt make python hard to write, and it arguably makes it easier to read. But it is different from the way the rest of the world works, and makes python distinctly unsuitable for "inline" environments (consider PHP, Javascript, ASP or in-configuration-file scripts) where it needs to live as a plain old string inside of another programs code or data file.
Nasal garbage collects runtime storage, so the programmer need not worry about manual allocation, or even circular references. The current implementation is a simple mark/sweep collector, which should be acceptable for most applications. Future enhancements will include a "return early" capability for latency-critical applications. The collector can be instructred to return after a certain maximum delay, and be restarted later. Fancy items like generational collectors fail the "small and simple" criteria and are not likely to be included.
Like python, nasal supports exception handling as a first-class language feature, with built-in runtime-inspectable stack trace. Rather like perl, however, there is no special "try" syntax for exception handling, nor inheritance-based catching semantics. Instead, you call a "try" function on another function, and inspect the return value on your own. Code simply calls die with an argument list, which is returned from the closest enclosing try() invocation. Elaborate exception handling isnt really appropriate for embedded scripting languages. [NOTE: this isnt finished yet]
Nasal tries to be stricter than perl. Operations like converting a non-numeric string value to a number, reading or writing past the end of an array or operating on a nil reference, which are generally legal in perl, throw exceptions in nasal. Perl sometimes bends over backwards to do something "reasonable" with your instructions (e.g. whats the boolean truth value of a hash reference?); nasal doesnt try ("error: non-scalar used in boolean context at line 92")
Nasal is very small, very simple, written in ANSI C, and generally an excellent choice for embedded applications. It uses a simple and transparent syntax interpretable by a simple "bracket matching and operator precedence" parser. It does not depend on any third party libraries other than the standard C library. It does not depend on third party tools like (f)lex and yacc/bison. It builds simply and easily, supports a reasonably simple extension API and cohabitates well with other code.
Nasal makes no use of the processor stack when running recursive code. This is important for embedded languages as it provides the ability to "exit early" from a Nasal context. An outside application may have realtime constraints, and Nasal can be instructed to run for only a certain number of "cycles" before returning. Later calls will automatically pick up the interpreter state where it left off.
Nasal provides "minimal threadsafety". Multithreaded operations on Nasal objects are safe in the sense that they cannot crash or corrupt the interpreter. They are not guaranteed to be atomic. In particular, poorly synchronized insertions into containers can "drop" objects into oblivion (which is OK from an interpreter stability standpoint, since the GC will clean them up normally). Race conditions have to be the programmers problem anyway, this is just another symptom. Garbage collection will block all threads before running. [NOTE: this part is still unimplemented.]
Enhancements:
- This release contains the updates that have been available in SimGear for some time now.
- Important new functionality includes bugfixes, many performance enhancements, a declared function argument syntax, a ternary (?:) operator, indexable and mutable string objects, interpreter thread safety features, and much work to the "standard" library (including stdio, bitfields, Unix system calls, and PCRE regular expressions).
<<lessIt is still young and incomplete in a few places, but is under active development and has been integrated as the extension language for the FlightGear simulator.
Documentation is still sparse. There is a design document available, which talks at length about the "whys" behind the design of Nasal and includes documentation for the built-in library functions.
More useful to the experienced programmer is the tutorial-style sample code, which explains and demonstrates all the syntax features of the language.
Like perl, python and javascript, nasal uses vectors (expandable arrays) and hash tables as its native data format. This is a well-understood idiom, and it works very well. I felt no need to rock the boat here.
Like perl, and unlike everything else, nasal combines numbers and strings into a single "scalar" datatype. No conversion needs to happen in user code, which simplifies common string handling tasks.
Like perl, but unlike python, hash keys must by scalars in nasal. Python supports a "tuple" constant type that can be used as well, but there is no equivalent in nasal (you cant use vectors as keys because they might change after the insertion).
Like perl and python, nasal uses a # character to indicate and end-of-line comment. There is no multiline begin/end comment syntax as in Javascript.
Like perl, nasal functions do not have named parameters. They get their arguments in a vector named "arg", and can extract them however they like. Unlike perl, Nasal takes advantage of this feature to do away with function "declaration" entirly; see below.
Like python, there is no hidden local object scope in a function call. The object on which a method was called is available to a function as a local variable named "me" (python calls this "self" by convention, but because nasal has no declared function arguments, there is no opportunity to change it).
Like perl, "objects" in nasal are simply hash tables. Looking an item up by name in a hash table and extracting a symbol for an object are just different syntax for the same operation (but read on for an important exception):
a["b"] = 1 means the same thing as: a.b = 1
The above paragraph is a minor lie. The "dot" syntax is also the clue to the interpreter to "save" the left hand side as the "me" reference if the expression is used as a function/method call. That is, these expressions are not equivalent (one is a plain function call, the other a method invocation on the object "a"):
a["b"](arg1, arg2) isnt the same as: a.b(arg1, arg2)
Like javascript, nasal lacks a specific "class" syntax for OOP programming. Instead, classes are simply objects. Each object supports a "parents" member array; symbol lookup on the object at runtime bounces to the parents (and the parents parents) if the symbol is not found in the hash. The parents field is just like any other object field, you can set it however you like and even change it at runtime if you are feeling especially perverse.
Like lisp, javascript and perl, nasal supports lexical closures. This means that the local symbol namespace available to your function when it is assigned remain constant over time. If you dont know what this means, you dont need to care. It is this feature that allows functions to use variables declared in the outer scope when it is defined (e.g. seeing "module" variables).
Like all other scripting languages, functions are just symbols in a namespace, but unlike all other scripting languages, there is no function "declaration" syntax. A function is always an anonymous object (a "lambda," in the parlance), which you assign to a variable in order to use. Like so:
myfunction = func { arg[0] + 1 }
myfunction(1); # returns 2
One annoyance of this feature is that Nasal functions dont have unique internal "names". So a debugging or exception stack trace can only give you a source line number, and not a function name as reference.
Nasal has a straightforward, readable syntax which is closest to javascript among other scripting languages. Like later versions of javascript, it includes has a hash lookup syntax as well as an object field accessor syntax (that is, you can do both a.b and a["b"]).
Unlike python, nasal has a grammar which is not whitespace-sensitive. This doesnt make python hard to write, and it arguably makes it easier to read. But it is different from the way the rest of the world works, and makes python distinctly unsuitable for "inline" environments (consider PHP, Javascript, ASP or in-configuration-file scripts) where it needs to live as a plain old string inside of another programs code or data file.
Nasal garbage collects runtime storage, so the programmer need not worry about manual allocation, or even circular references. The current implementation is a simple mark/sweep collector, which should be acceptable for most applications. Future enhancements will include a "return early" capability for latency-critical applications. The collector can be instructred to return after a certain maximum delay, and be restarted later. Fancy items like generational collectors fail the "small and simple" criteria and are not likely to be included.
Like python, nasal supports exception handling as a first-class language feature, with built-in runtime-inspectable stack trace. Rather like perl, however, there is no special "try" syntax for exception handling, nor inheritance-based catching semantics. Instead, you call a "try" function on another function, and inspect the return value on your own. Code simply calls die with an argument list, which is returned from the closest enclosing try() invocation. Elaborate exception handling isnt really appropriate for embedded scripting languages. [NOTE: this isnt finished yet]
Nasal tries to be stricter than perl. Operations like converting a non-numeric string value to a number, reading or writing past the end of an array or operating on a nil reference, which are generally legal in perl, throw exceptions in nasal. Perl sometimes bends over backwards to do something "reasonable" with your instructions (e.g. whats the boolean truth value of a hash reference?); nasal doesnt try ("error: non-scalar used in boolean context at line 92")
Nasal is very small, very simple, written in ANSI C, and generally an excellent choice for embedded applications. It uses a simple and transparent syntax interpretable by a simple "bracket matching and operator precedence" parser. It does not depend on any third party libraries other than the standard C library. It does not depend on third party tools like (f)lex and yacc/bison. It builds simply and easily, supports a reasonably simple extension API and cohabitates well with other code.
Nasal makes no use of the processor stack when running recursive code. This is important for embedded languages as it provides the ability to "exit early" from a Nasal context. An outside application may have realtime constraints, and Nasal can be instructed to run for only a certain number of "cycles" before returning. Later calls will automatically pick up the interpreter state where it left off.
Nasal provides "minimal threadsafety". Multithreaded operations on Nasal objects are safe in the sense that they cannot crash or corrupt the interpreter. They are not guaranteed to be atomic. In particular, poorly synchronized insertions into containers can "drop" objects into oblivion (which is OK from an interpreter stability standpoint, since the GC will clean them up normally). Race conditions have to be the programmers problem anyway, this is just another symptom. Garbage collection will block all threads before running. [NOTE: this part is still unimplemented.]
Enhancements:
- This release contains the updates that have been available in SimGear for some time now.
- Important new functionality includes bugfixes, many performance enhancements, a declared function argument syntax, a ternary (?:) operator, indexable and mutable string objects, interpreter thread safety features, and much work to the "standard" library (including stdio, bitfields, Unix system calls, and PCRE regular expressions).
Download (0.10MB)
Added: 2006-07-04 License: LGPL (GNU Lesser General Public License) Price:
1209 downloads
Samba::LDAP::User 0.03
Samba::LDAP::User is a Perl module to manipulate a Samba LDAP User. more>>
Samba::LDAP::User is a Perl module to manipulate a Samba LDAP User.
SYNOPSIS
use Carp;
use Samba::LDAP::User;
# create Template object
my $user = Samba::LDAP::User->new()
or croak "Cant create objectn";
Various methods to manipulate a Samba LDAP user. Add, delete, modify, show and change a users password.
INTERFACE
new
Create a new Samba::LDAP::User object
add_user
Takes many options. For example:
user =>
oldpass =>
newpass =>
workstation =>
ou =>
user_uid =>
group =>
windows_user =>
trust_account =>
homedir =>
shell =>
gecos =>
skeleton_dir =>
surname =>
family_name =>
local_mail_address =>
mail_to_address =>
time_to_wait =>
aix =>
groups =>
ox =>
can_change_pass =>
must_change_pass =>
account_flags =>
logon_script =>
home_path =>
home_drive =>
user_profile =>
aix_user =>
The above options are only needed if you dont want to use the defaults that are set in /etc/smbldap/smbldap.conf
delete_user
disable_user
is_valid_user
is_samba_user
is_unix_user
is_nonldap_unix_user
get_homedir
make_hash
change_password
change_password(
user => ghenry,
oldpass => "$oldpass",
newpass => "$newpass",
samba => 1, # Update only Samba pass, can be
# unix => 1 for unix pass only
);
Change user password in LDAP Directory
Checks the users exists first, then changes the password If user doesnt exist, returns the error etc.
If no oldpass arg is passed, binds as rootdn and sets a password
Default is set to change/add a Samba "and" Unix password. If you dont want this, pass in unix => 0, or samba => 0, etc.
<<lessSYNOPSIS
use Carp;
use Samba::LDAP::User;
# create Template object
my $user = Samba::LDAP::User->new()
or croak "Cant create objectn";
Various methods to manipulate a Samba LDAP user. Add, delete, modify, show and change a users password.
INTERFACE
new
Create a new Samba::LDAP::User object
add_user
Takes many options. For example:
user =>
oldpass =>
newpass =>
workstation =>
ou =>
user_uid =>
group =>
windows_user =>
trust_account =>
homedir =>
shell =>
gecos =>
skeleton_dir =>
surname =>
family_name =>
local_mail_address =>
mail_to_address =>
time_to_wait =>
aix =>
groups =>
ox =>
can_change_pass =>
must_change_pass =>
account_flags =>
logon_script =>
home_path =>
home_drive =>
user_profile =>
aix_user =>
The above options are only needed if you dont want to use the defaults that are set in /etc/smbldap/smbldap.conf
delete_user
disable_user
is_valid_user
is_samba_user
is_unix_user
is_nonldap_unix_user
get_homedir
make_hash
change_password
change_password(
user => ghenry,
oldpass => "$oldpass",
newpass => "$newpass",
samba => 1, # Update only Samba pass, can be
# unix => 1 for unix pass only
);
Change user password in LDAP Directory
Checks the users exists first, then changes the password If user doesnt exist, returns the error etc.
If no oldpass arg is passed, binds as rootdn and sets a password
Default is set to change/add a Samba "and" Unix password. If you dont want this, pass in unix => 0, or samba => 0, etc.
Download (0.080MB)
Added: 2007-01-12 License: Perl Artistic License Price:
1024 downloads
Device::Audiotron 1.02
Device::Audiotron provides a tie-in into the API included in the latest firmware for Voyetra Turtle Beachs Audiotron. more>>
Device::Audiotron provides a tie-in into the API included in the latest firmware for Voyetra Turtle Beachs Audiotron.
SYNOPSIS
use Device::Audiotron; $at = new Device::Audiotron("Audiotron IP address","username","password"); if(!$at){die "Audiotron object failed to initialize.";}
my ($ref_status, $ref_shares, $ref_hosts) = $at->GlobalInfo(); my $firmware_version = $ref_status->{"Version"};
Device::Audiotron provides a tie-in into the API included in the latest firmware for Voyetra Turtle Beachs Audiotron.
I highly suggest reading through the API documentation located at http://www.turtlebeach.com/site/products/audiotron/api/dl_api.asp before attempting to implement this module.
The available methods for the Audiotron object and an example of usage for each are listed below. The native API call is listed in brackets below each method for informational purposes and for ease in referencing Voyetras API documentation.
GetInfo(Type,[Count],[Criteria])
[Apigetinfo.asp]
Returns a string containing the results from the command request.
$type = "Global";
$info = $at->GetInfo($type);
OR
$type = "artist";
$count = 4;
$criteria = "Staind";
$info = $at->GetInfo($type,$count,$criteria);
Qfile(Type,Criteria)
[Apiqfile.asp]
Returns a string containing the results from the command request.
$type = "File";
$file = q|LITHIUMMP3BushdeconstructedComedown.mp3|;
$cmd_result = $at->Qfile($type, $file);
AddFile(Full_File_Name)
[Apiaddfile.asp]
Returns a string containing the results from the command request.
$file = q|COBALTMP3new_song.mp3|;
$cmd_result = $at->AddFile($file);
Cmd(Command,[Arg])
[Apicmd.asp]
Returns a string containing the results from the command request.
$cmd_name = "play";
$cmd_result = $at->Cmd($cmd_name);
OR
$cmd_name = "goto";
$cmd_arg = "18";
$cmd_result = $at->Cmd($cmd_name, $cmd_arg);
GetStatus()
[Apigetstatus.asp]
Returns a hash containing element names equivalent to the field names returned by the Audiotron.
%status = $at->GetStatus();
print $status{State};
GlobalInfo()
[See GetInfo]
Returns references to a hash, an array, and an array of hashes.
This is simply a call to GetInfo with "Global" passed as the type but has been customized to pre-parse the results.
($ref_status, $ref_shares, $ref_hosts) = $at->GlobalInfo();
In the above example $ref_status is a reference to a hash containing element names equivalent to the field names returned from the "status" portion of the results. So for example, to get the version number of the firmware:
$firmware_version = $ref_status->{"Version"};
Next, $ref_shares is a reference to an array where each element contains the UNC name for the share as listed in the Audiotron.
Lastly, $ref_hosts is a reference to an array of hashes, one hash per host known by the Audiotron. Each hash in the array contains three elements named Host,IP, and State. So for example, to get the IP address of the first host in the array:
$ip_add = $ref_hosts->[0]->{"IP"};
Msg(Text_line1,[Text_line2],[Timeout])
[Apimsg.api]
Returns a string containing the results from the command request.
$line1 = "This is a test.";
$line2 = "Just Another Perl Hacker";
$time_out = "5";
$cmd_result = $at->Msg($line1, $line2, $time_out);
DumpToc(Share_name)
[Apidumptoc.asp]
Returns a (sometimes huge!) string containing the results from the command request.
$share = q|LITHIUMMP3|;
$toc = $at->DumpToc($share);
NOTE:
This is here just as a placeholder, newer versions will allow the output to be written to a file instead of be handed back as a string. Very inefficient in its current form.
<<lessSYNOPSIS
use Device::Audiotron; $at = new Device::Audiotron("Audiotron IP address","username","password"); if(!$at){die "Audiotron object failed to initialize.";}
my ($ref_status, $ref_shares, $ref_hosts) = $at->GlobalInfo(); my $firmware_version = $ref_status->{"Version"};
Device::Audiotron provides a tie-in into the API included in the latest firmware for Voyetra Turtle Beachs Audiotron.
I highly suggest reading through the API documentation located at http://www.turtlebeach.com/site/products/audiotron/api/dl_api.asp before attempting to implement this module.
The available methods for the Audiotron object and an example of usage for each are listed below. The native API call is listed in brackets below each method for informational purposes and for ease in referencing Voyetras API documentation.
GetInfo(Type,[Count],[Criteria])
[Apigetinfo.asp]
Returns a string containing the results from the command request.
$type = "Global";
$info = $at->GetInfo($type);
OR
$type = "artist";
$count = 4;
$criteria = "Staind";
$info = $at->GetInfo($type,$count,$criteria);
Qfile(Type,Criteria)
[Apiqfile.asp]
Returns a string containing the results from the command request.
$type = "File";
$file = q|LITHIUMMP3BushdeconstructedComedown.mp3|;
$cmd_result = $at->Qfile($type, $file);
AddFile(Full_File_Name)
[Apiaddfile.asp]
Returns a string containing the results from the command request.
$file = q|COBALTMP3new_song.mp3|;
$cmd_result = $at->AddFile($file);
Cmd(Command,[Arg])
[Apicmd.asp]
Returns a string containing the results from the command request.
$cmd_name = "play";
$cmd_result = $at->Cmd($cmd_name);
OR
$cmd_name = "goto";
$cmd_arg = "18";
$cmd_result = $at->Cmd($cmd_name, $cmd_arg);
GetStatus()
[Apigetstatus.asp]
Returns a hash containing element names equivalent to the field names returned by the Audiotron.
%status = $at->GetStatus();
print $status{State};
GlobalInfo()
[See GetInfo]
Returns references to a hash, an array, and an array of hashes.
This is simply a call to GetInfo with "Global" passed as the type but has been customized to pre-parse the results.
($ref_status, $ref_shares, $ref_hosts) = $at->GlobalInfo();
In the above example $ref_status is a reference to a hash containing element names equivalent to the field names returned from the "status" portion of the results. So for example, to get the version number of the firmware:
$firmware_version = $ref_status->{"Version"};
Next, $ref_shares is a reference to an array where each element contains the UNC name for the share as listed in the Audiotron.
Lastly, $ref_hosts is a reference to an array of hashes, one hash per host known by the Audiotron. Each hash in the array contains three elements named Host,IP, and State. So for example, to get the IP address of the first host in the array:
$ip_add = $ref_hosts->[0]->{"IP"};
Msg(Text_line1,[Text_line2],[Timeout])
[Apimsg.api]
Returns a string containing the results from the command request.
$line1 = "This is a test.";
$line2 = "Just Another Perl Hacker";
$time_out = "5";
$cmd_result = $at->Msg($line1, $line2, $time_out);
DumpToc(Share_name)
[Apidumptoc.asp]
Returns a (sometimes huge!) string containing the results from the command request.
$share = q|LITHIUMMP3|;
$toc = $at->DumpToc($share);
NOTE:
This is here just as a placeholder, newer versions will allow the output to be written to a file instead of be handed back as a string. Very inefficient in its current form.
Download (0.004MB)
Added: 2006-11-13 License: Perl Artistic License Price:
1077 downloads
PawPaw 0.6
PawPaw is a forth-like language except that it allows top-down development. more>>
PawPaw is a forth-like language except that it allows top-down development.
There are several stacks. As you would expect there is a data stack, a return stack. But there is also a control structure stack.
Include files are implemented with the # token, which is followed by the filename to include (up to 19 levels).
Here is a list of the words that are implemented so far:
EXIT calls exit(0) to end the interpreter.
+L add longs
.L print long
+ int add
. int print
: define a new word
niy print that a word (string arg) is not implemented, exit the interpret loop early.
; end a definition
"word" edit calls the Kwrite editor on the source file name corresponding to word.
(note the name of the file is a hex string followed by .pp)
size var name define a variable.
value const name define a constant
@C fetch from a character var
!C store to a char var
@S fetch from a short var
!S store to a short var
@ integer fetch
! integer store
- int subtract
- int multiply
% int modulus
/ int divide
& integer and
| integer or
^ integer exclusive or
~ 1s complement integer
> integer shift right
> < >= L convert int to long
L->I convert long to int
@L fetch long
!L store long
-L long subtract
*L long multiply
%L long modulus
&L long and
|L long or
^L long eor
~L ones complement long
L shift long right by int arg
L =L !=L ==L long relationals
dup int dup
dupL long dup
drop int drop
dropL long drop
rot int rot
rotL long rot
swap int swap
swapL long swap
pick int pick
pickL long pick by int arg
[]! subscripted store
/* ... */ comment
"word" compile compile a definition file
"xxx" "yyy" add_dep add a dependency for yyy to word xxx file.
control structure
if (expr) then true-part else false-part fi
or
if (expr) then true-part fi
while expr do body od
until expr do body od
Enhancements:
- Autoloading was fixed.
<<lessThere are several stacks. As you would expect there is a data stack, a return stack. But there is also a control structure stack.
Include files are implemented with the # token, which is followed by the filename to include (up to 19 levels).
Here is a list of the words that are implemented so far:
EXIT calls exit(0) to end the interpreter.
+L add longs
.L print long
+ int add
. int print
: define a new word
niy print that a word (string arg) is not implemented, exit the interpret loop early.
; end a definition
"word" edit calls the Kwrite editor on the source file name corresponding to word.
(note the name of the file is a hex string followed by .pp)
size var name define a variable.
value const name define a constant
@C fetch from a character var
!C store to a char var
@S fetch from a short var
!S store to a short var
@ integer fetch
! integer store
- int subtract
- int multiply
% int modulus
/ int divide
& integer and
| integer or
^ integer exclusive or
~ 1s complement integer
> integer shift right
> < >= L convert int to long
L->I convert long to int
@L fetch long
!L store long
-L long subtract
*L long multiply
%L long modulus
&L long and
|L long or
^L long eor
~L ones complement long
L shift long right by int arg
L =L !=L ==L long relationals
dup int dup
dupL long dup
drop int drop
dropL long drop
rot int rot
rotL long rot
swap int swap
swapL long swap
pick int pick
pickL long pick by int arg
[]! subscripted store
/* ... */ comment
"word" compile compile a definition file
"xxx" "yyy" add_dep add a dependency for yyy to word xxx file.
control structure
if (expr) then true-part else false-part fi
or
if (expr) then true-part fi
while expr do body od
until expr do body od
Enhancements:
- Autoloading was fixed.
Download (0.040MB)
Added: 2007-07-27 License: GPL (GNU General Public License) Price:
819 downloads
C::DynaLib::Struct 0.55
C::DynaLib::Struct is a tool for handling the C `struct data type. more>>
C::DynaLib::Struct is a tool for handling the C `struct data type.
SYNOPSIS
use C::DynaLib::Struct;
Define C::DynaLib::Struct(
$struct_tag,
$template0, @field_names0,
[$template1, @field_names1,]
... );
$rstruct = tie( $struct, $struct_tag [, @initializer_list] );
$value = $rstruct->my_field();
$rstruct->my_field( $new_value );
$pointer_to_struct = pack( p, $struct );
$struct = $new_struct; # assigns all fields at once
# after passing pointer-to-struct to a C function:
$rstruct->Unpack();
$returned_value = $rstruct->my_field();
When mixing Perl and C, the conversion of data types can be rather tedious and error-prone. This module provides an abstraction from Perls pack and unpack operators for using structures whose member data types and positions do not change.
Here are some examples of C code that deals with a struct. On the right are some possible Perl equivalents.
C Perl
- ----
typedef struct { use C::DynaLib::Struct;
int m_int; Define C::DynaLib::Struct(
double m_double; Foo,
char * m_string; i => [m_int],
} Foo; d => [m_double],
p => [m_string] );
# or, equivalently,
Define C::DynaLib::Struct(Foo,
idp, [qw(m_int m_double m_string)]);
Foo foo;
Foo *pfoo = &foo; $rfoo = tie ($foo, Foo);
i = pfoo->m_int; $i = $rfoo->m_int;
d = foo.m_double; $d = (tied $foo)->m_double;
pfoo->m_string = "hi"; $rfoo->m_string("hi");
Foo bar; tie ($bar, Foo);
bar = foo; $bar = $foo;
void do_foo(Foo *arg); use C::DynaLib;
$lib = new C::DynaLib("-lfoo");
$do_foo = $lib->DeclareSub("do_foo","","P");
# or you could write an XSUB.
do_foo(&foo); &$do_foo($foo);
returned_i = foo.m_int; $rfoo->Unpack();
$returned_i = $rfoo->m_int;
<<lessSYNOPSIS
use C::DynaLib::Struct;
Define C::DynaLib::Struct(
$struct_tag,
$template0, @field_names0,
[$template1, @field_names1,]
... );
$rstruct = tie( $struct, $struct_tag [, @initializer_list] );
$value = $rstruct->my_field();
$rstruct->my_field( $new_value );
$pointer_to_struct = pack( p, $struct );
$struct = $new_struct; # assigns all fields at once
# after passing pointer-to-struct to a C function:
$rstruct->Unpack();
$returned_value = $rstruct->my_field();
When mixing Perl and C, the conversion of data types can be rather tedious and error-prone. This module provides an abstraction from Perls pack and unpack operators for using structures whose member data types and positions do not change.
Here are some examples of C code that deals with a struct. On the right are some possible Perl equivalents.
C Perl
- ----
typedef struct { use C::DynaLib::Struct;
int m_int; Define C::DynaLib::Struct(
double m_double; Foo,
char * m_string; i => [m_int],
} Foo; d => [m_double],
p => [m_string] );
# or, equivalently,
Define C::DynaLib::Struct(Foo,
idp, [qw(m_int m_double m_string)]);
Foo foo;
Foo *pfoo = &foo; $rfoo = tie ($foo, Foo);
i = pfoo->m_int; $i = $rfoo->m_int;
d = foo.m_double; $d = (tied $foo)->m_double;
pfoo->m_string = "hi"; $rfoo->m_string("hi");
Foo bar; tie ($bar, Foo);
bar = foo; $bar = $foo;
void do_foo(Foo *arg); use C::DynaLib;
$lib = new C::DynaLib("-lfoo");
$do_foo = $lib->DeclareSub("do_foo","","P");
# or you could write an XSUB.
do_foo(&foo); &$do_foo($foo);
returned_i = foo.m_int; $rfoo->Unpack();
$returned_i = $rfoo->m_int;
Download (0.035MB)
Added: 2006-07-05 License: Perl Artistic License Price:
1207 downloads
Search::QueryParser 0.91
Search::QueryParser parses a query string into a data structure suitable for external search engines. more>>
Search::QueryParser parses a query string into a data structure suitable for external search engines.
SYNOPSIS
my $qp = new Search::QueryParser;
my $s = +mandatoryWord -excludedWord +field:word "exact phrase";
my $query = $qp->parse($s) or die "Error in query : " . $qp->err;
$someIndexer->search($query);
# query with comparison operators and implicit plus (second arg is true)
$query = $qp->parse("txt~^foo.* date>=01.01.2001 date<<less
SYNOPSIS
my $qp = new Search::QueryParser;
my $s = +mandatoryWord -excludedWord +field:word "exact phrase";
my $query = $qp->parse($s) or die "Error in query : " . $qp->err;
$someIndexer->search($query);
# query with comparison operators and implicit plus (second arg is true)
$query = $qp->parse("txt~^foo.* date>=01.01.2001 date<<less
Download (0.007MB)
Added: 2006-06-15 License: Perl Artistic License Price:
1226 downloads
mdadm 2.6.3
mdadm is a tool for creating, maintaining, and monitoring Linux more>>
mdadm project is a tool for maintaining, creating, and monitoring Linux "md" device arrays, also known as Software RAID.
These notes apply to 2.6 kernels only and, in some cases, to 2.6.15 or later.
Md arrays can be assembled at boot time using the autodetect functionality
which is triggered by storing components of an array in partitions of type
fd - Linux Raid Autodetect.
They can also be assembled by specifying the component devices in a
kernel parameter such as
md=0,/dev/sda,/dev/sdb
In this case, /dev/md0 will be assembled (because of the 0) from the listed
devices.
These mechanisms, while useful, do not provide complete functionality
and are unlikely to be extended. The preferred way to assemble md arrays at boot time is using mdadm or mdassemble (which is a trimmed-down mdadm).
To assemble an array which contains the root filesystem, mdadm needs to be run before that filesystem is mounted, and so needs to be run from an initial-ram-fs. It is how this can work that is the primary focus of this document.
It should be noted up front that only the array containing the root
filesystem should be assembled from the initramfs. Any other arrays
should be assembled under the control of files on the main filesystem
as this enhanced flexibility and maintainability.
A minimal initramfs for assembling md arrays can be created using 3 files and one directory. These are:
/bin Directory
/bin/mdadm statically linked mdadm binary
/bin/busybox statically linked busybox binary
/bin/sh hard link to /bin/busybox
/init a shell script which call mdadm appropriately.
An example init script is:
#!/bin/sh
echo Auto-assembling boot md array
mkdir /proc
mount -t proc proc /proc
if [ -n "$rootuuid" ]
then arg=--uuid=$rootuuid
elif [ -n "$mdminor" ]
then arg=--super-minor=$mdminor
else arg=--super-minor=0
fi
echo "Using $arg"
mdadm -Acpartitions $arg --auto=part /dev/mda
cd /
mount /dev/mda1 /root || mount /dev/mda /root
umount /proc
cd /root
exec chroot . /sbin/init < /dev/console > /dev/console 2>&1
Enhancements:
- Assorted minor bugs relating to RAID4, verison-1 metadata, option parsing, spare migration, and more were fixed.
<<lessThese notes apply to 2.6 kernels only and, in some cases, to 2.6.15 or later.
Md arrays can be assembled at boot time using the autodetect functionality
which is triggered by storing components of an array in partitions of type
fd - Linux Raid Autodetect.
They can also be assembled by specifying the component devices in a
kernel parameter such as
md=0,/dev/sda,/dev/sdb
In this case, /dev/md0 will be assembled (because of the 0) from the listed
devices.
These mechanisms, while useful, do not provide complete functionality
and are unlikely to be extended. The preferred way to assemble md arrays at boot time is using mdadm or mdassemble (which is a trimmed-down mdadm).
To assemble an array which contains the root filesystem, mdadm needs to be run before that filesystem is mounted, and so needs to be run from an initial-ram-fs. It is how this can work that is the primary focus of this document.
It should be noted up front that only the array containing the root
filesystem should be assembled from the initramfs. Any other arrays
should be assembled under the control of files on the main filesystem
as this enhanced flexibility and maintainability.
A minimal initramfs for assembling md arrays can be created using 3 files and one directory. These are:
/bin Directory
/bin/mdadm statically linked mdadm binary
/bin/busybox statically linked busybox binary
/bin/sh hard link to /bin/busybox
/init a shell script which call mdadm appropriately.
An example init script is:
#!/bin/sh
echo Auto-assembling boot md array
mkdir /proc
mount -t proc proc /proc
if [ -n "$rootuuid" ]
then arg=--uuid=$rootuuid
elif [ -n "$mdminor" ]
then arg=--super-minor=$mdminor
else arg=--super-minor=0
fi
echo "Using $arg"
mdadm -Acpartitions $arg --auto=part /dev/mda
cd /
mount /dev/mda1 /root || mount /dev/mda /root
umount /proc
cd /root
exec chroot . /sbin/init < /dev/console > /dev/console 2>&1
Enhancements:
- Assorted minor bugs relating to RAID4, verison-1 metadata, option parsing, spare migration, and more were fixed.
Download (0.19MB)
Added: 2007-08-20 License: GPL (GNU General Public License) Price:
812 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above arg search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed