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 30.071.413 Times

Variable::Strongly::Typed 1.1.0

  Date Added: September 23, 2010  |  Visits: 539

Variable::Strongly::Typed

Report Broken Link
Printer Friendly Version


Product Homepage
Download (72 downloads)

Variable::Strongly::Typed is a Perl module to let some variables be strongly typed. SYNOPSIS use Variable::Strongly::Typed; my $int :TYPE(int); # must have an int value my $float :TYPE(float); # must have a float value my $string :TYPE(string); # must not be a reference my $file :TYPE(IO::File); # must be an IO::File my @array_of_ints :TYPE(int); # Each slot must contain # an int my %hash_of_floats :TYPE(float); # Each value must be a float my $int_own_error :TYPE(int, &my_own_error_handler); # Roll my own error handler my @array_of_rgb :TYPE(&red_green_blue); # my enumerated type # For subs!! sub return_an_int :TYPE(int) { # .. do some stuff .. return $something; } # ... and later ... $int = 23; # All is well $int = howdy!; # This line will croak with a good error message $float = 3.23; # All is well, nothing to see here $float = new XML::Parser; # croak! $array_of_ints[23] = 44; # Groovy $array_of_ints[12] = yah; # croak! $hash_of_floats{pi} = 3.14159; # no problem $hash_of_floats{e} = new IO::File; # croak! # Return 1 if this val is RED, BLUE, or GREEN # 0 otherwise sub red_green_blue { local $_ = shift; /A RED z/xms || /A BLUE z/xms || /A GREEN z/xms; } $array_of_my_very_own_types[23] = 99; # croak! $array_of_my_very_own_types[2] = BLUE; # OK! $int_own_error = lksdklwe; # The sub my_own_error_hanlder # will be # called with the # offending value my $got_it = return_an_int(); # Will croak (or call your error # function) # if this sub doesnt # return an int This modules allow you to strongly type your variables. Also known as the no fun module - it can greatly enhance you codes quality and robustness. By enforcing types on some (or all) of your variables you will eliminate a large class of careless (& not so careless) errors. This could also aid an editor or code-browsing tools to verify code correctness without having to execute the script..

Requirements: No special requirements
Platforms: Linux
Keyword: Array Blue Error Float Int Io Libraries Own Perl Module Programming To Let Variables Variablestronglytyped
Users rating: 0/10

License: Freeware Size: 10.24 KB
VARIABLE::STRONGLY::TYPED RELATED
Libraries  -  Iterator::IO 0.02
Iterator::IO is a Perl module with filesystem and stream iterators. SYNOPSIS use Iterator::IO; # Return the names of files in a directory (except . and ..) $iter = idir_listing ($path); # Return all the files in a directory tree, one at a...
14.34 KB  
Libraries  -  B::Generate 1.06
B::Generate is a Perl module which you can create your own op trees. SYNOPSIS use B::Generate; # Do nothing, slowly. CHECK { my $null = new B::OP("null",0); my $enter = new B::OP("enter",0); my $cop = new B::COP(0, "hiya", 0); my $leave...
12.29 KB  
Libraries  -  PDL::IO::Misc 2.4.3
PDL::IO::Misc is a Perl module with misc IO routines for PDL. rcols() Read ASCII whitespaced cols from a file into piddles and perl arrays (also see "rgrep()"). There are two calling conventions - the old version, where a pattern can be...
2.1 MB  
Libraries  -  Variable::Strongly::Typed::Array 1.1.0
Variable::Strongly::Typed::Array is a Perl module for strongly typed array. SYNOPSIS This class is utilized by Variable::Strongly::Typed - you dont access this directly my @array_of_ints :TYPE(int); # Each slot must contain an int my...
10.24 KB  
Libraries  -  CAD::Drawing::IO::Tk 0.04
CAD::Drawing::IO::Tk is a Perl module with GUI I/O methods for CAD::Drawing. This module is considered extremely pre-ALPHA and its use is probably deprecated by the time you read this. Methods There is no constructor for this class, its...
8.19 KB  
Libraries  -  CAD::Drawing::IO::PgDB 0.03
CAD::Drawing::IO::PgDB is a Perl module with PostgreSQL save / load methods. This module is considered pre-ALPHA and under-documented. Its use is strongly discouraged except under experimental conditions. Particularly susceptible to change will...
8.19 KB  
Libraries  -  IO::Pipe::Producer 1.5
IO::Pipe::Producer is a Perl module that provides two modules getSubroutineProducer and getSystemProducer. SYNOPSIS # Module which provides 2 methods: getSubroutineProducer # and getSystemProducer. They take a subroutine reference # (with...
6.14 KB  
Libraries  -  IO::Interactive 0.0.3
IO::Interactive is a Perl module with utilities for interactive I/O. SYNOPSIS use IO::Interactive qw(is_interactive interactive busy); if ( is_interactive() ) { print "Running interactivelyn"; } # or... print {interactive} "Running...
5.12 KB  
Libraries  -  IO::Prompt 0.99.4
IO::Prompt is a Perl module to interactively prompt for user input. SYNOPSIS use IO::Prompt; while( prompt "next: " ) { print "You said $_n"; } By default, this module exports a single function prompt. It prompts the user to enter some...
14.34 KB  
Libraries  -  IO::Busy 0.0.3
IO::Busy is a Perl module to intercept terminal input while something else is happening. SYNOPSIS use IO::Busy; my $fh = busy { non_interactive_stuff(); }; This module exports a single subroutine, named busy. That subroutine takes a...
4.1 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB