Main > Programming > Libraries >

ImplicitThis 0.01_001

ImplicitThis 0.01_001

Sponsored Links

ImplicitThis 0.01_001 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.004 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 867
Date added: 2007-06-09
Publisher: Scott Walters

ImplicitThis 0.01_001 description

ImplicitThis is a syntactical sugar for OO methods.

SYNOPSIS

use ImplicitThis; ImplicitThis::imply();

sub new {
my $type = shift;
my %args = @_;
# must be blessed hash object
bless {
foo => $args{foo},
bar => $args{bar},
}, $type;
}

sub my_accessor {
# $this is read for us. $bar is aliased to $this->{bar}, similiar for $foo
$this->another_accessor($bar);
$foo++;
}

sub _another_accessor {
# this will die if called from something not derived from our package
$foo++;
}

ABSTRACT

Methods in OO Perl receive "$this" without having to read it. Instance field variables are accessable by name instead of having to dereference the hash ref. Privicy is enforced for methods starting with an understore.

This emulates other OO languages, such as Java and C++, where the compiler implicitly and invisibly passes "this" as the first argument of each method call. While Perl passes this argument invisibly, you must manually write code to read it. Java and C++ also discover, at compile time, rather a variable is an instance variable or a static variable, without you needing to distinguish them using special syntax. We remove the extra syntax, but this is learned at run time, not compile time. Unlike Alias.pm, this code is likely to have a noticable impact on performance of code that uses OO accessors heavily.

ImplicitThis::imply() places a thin wrapper is placed around methods in your
object. *this{SCALAR} is a reference to a lexical weve shifted off the argument list. Aliases are created for each key in %$this to itself value in the same way.

While this module works fine for me, your milage may very: it has not been extensively tested.

Similar to Alias.pm. However, were pure Perl, and _no_ additional syntax is introduced.

ImplicitThis 0.01_001 Screenshot

Advertisements

ImplicitThis 0.01_001 Keywords

Bookmark ImplicitThis 0.01_001

Hyperlink code:
Link for forum:

ImplicitThis 0.01_001 Copyright

WareSeeker periodically updates pricing and software information of ImplicitThis 0.01_001 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of ImplicitThis 0.01_001 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
PacketDB projects goal is to create a set of workflows that treat tcpdumps/packet captures. Free Download
B::XPath class can search Perl optrees with XPath syntax. Free Download
Lexi project is a dict client and vocabulary builder. Free Download
hsclock is an accurate, multi-zone GTK clock. Free Download
Qubit (Qmail Ultimate Backend Integration Tool) is a fully Web-based qmail server configuration and administration suite. Free Download
Chemistry::SQL is an access database functions module. Free Download
CGI::Simple is a simple totally OO CGI interface that is CGI.pm compliant. Free Download
Email::Handle is a Objective Email Handler. Free Download