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.257.579 Times

Scalar::Properties 0.12

  Date Added: January 22, 2010  |  Visits: 869

Scalar::Properties

Report Broken Link
Printer Friendly Version


Product Homepage
Download (94 downloads)



Scalar::Properties is a Perl module package that contains run-time properties on scalar variables. SYNOPSIS use Scalar::Properties; my $val = 0->true; if ($val && $val == 0) { print "yup, its true alright...n"; } my @text = ( hello world->greeting(1), forget it, hi there->greeting(1), ); print grep { $_->is_greeting } @text; my $l = hello world->length; Scalar::Properties attempts to make Perl more object-oriented by taking an idea from Ruby: Everything you manipulate is an object, and the results of those manipulations are objects themselves. hello world->length (-1234)->abs "oh my god, its full of properties"->index(g) The first example asks a string to calculate its length. The second example asks a number to calculate its absolute value. And the third example asks a string to find the index of the letter g. Using this module you can have run-time properties on initialized scalar variables and literal values. The word properties is used in the Perl 6 sense: out-of-band data, little sticky notes that are attached to the value. While attributes (as in Perl 5s attribute pragma, and see the Attribute::* family of modules) are handled at compile-time, properties are handled at run-time. Internally properties are implemented by making their values into objects with overloaded operators. The actual properties are then simply hash entries. Most properties are simply notes you attach to the value, but some may have deeper meaning. For example, the true and false properties plays a role in boolean context, as the first example of the Synopsis shows. Properties can also be propagated between values. For details, see the EXPORTS section below. Here is an example why this might be desirable: pass_on(approximate); my $pi = 3->approximate(1); my $circ = 2 * $rad * $pi; # now $circ->approximate indicates that this value was derived # from approximate values Please dont use properties whose name start with an underscore; these are reserved for internal use. You can set and query properties like this: $var->myprop(1) sets the property to a true value. $var->myprop(0) sets the property to a false value. Note that this doesnt delete the property (to do so, use the del_props method described below). $var->is_myprop, $var->has_myprop returns a true value if the property is set (i.e., defined and has a true value). The two alternate interfaces are provided to make querying attributes sound more natural. For example: $foo->is_approximate; $bar->has_history;.

Requirements: No special requirements
Platforms: Linux
Keyword: Example Libraries Perl Perl Module Programming Properties Run-time Scalarproperties True Value
Users rating: 0/10

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


SCALAR::PROPERTIES RELATED
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Libraries  -  Bio::Tools::Run::JavaRunner 1.5.2_100
Bio::Tools::Run::JavaRunner is a Perl module that can run java programs. SYNOPSIS my $runner = Bio::Tools::Run::JavaRunner->new(-jar => $jar); $runner->run(); This module is probably incomplete. It is intended to be a wrapper for running...
942.08 KB  
Libraries  -  Test::LectroTest::Property 0.3500
Test::LectroTest::Property is a Perl module with properties that make testable claims about your software. SYNOPSIS use MyModule; # provides my_function_to_test use Test::LectroTest::Generator qw( :common ); use Test::LectroTest::Property...
54.27 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  auto-build 1.2.0
auto-build is a Perl module that can run automated, unattended software build processes. SYNOPSIS # auto-build [OPTION]... Run build using latest code currently in source control # auto-build --config /etc/auto-build.d/auto-build.conf Run...
204.8 KB  
Libraries  -  AlignAid 0.0.2
AlignAid is a Perl module that easily run sequence alignments locally or on a cluster. SYNOPSIS use AlignAid; # create an AlignAid object # a single, locally run blast job is the default my $job = AlignAid->new( db => my_blast_db, dir =>...
348.16 KB  
Libraries  -  Regexp::Common::time 0.01
Regexp::Common::time Perl module contains date and time regexps. SYNOPSIS use Regexp::Common qw(time); # Piecemeal, Time::Format-like patterns $RE{time}{tf}{-pat => pattern} # Piecemeal, strftime-like patterns $RE{time}{strftime}{-pat =>...
35.84 KB  
Libraries  -  Test::LectroTest 0.3500
Test::LectroTest is a Perl module with easy, automatic, specification-based tests. SYNOPSIS #!/usr/bin/perl -w use MyModule; # contains code we want to test use Test::LectroTest; Property { ##[ x <- Int, y <- Int ]##...
54.27 KB  
Programming  -  Perl Module Manager 1.2.0.18
Perl Module Manager helps you to install, un-install and manage Perl modules from a CPAN site and other sources in an easy and intuitive way. Allows you to search through thousands of useful modules and libraries on a CPAN site and its mirrors....
1.44 MB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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  
Libraries  -  wolfSSL 4.0.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...
3.88 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