Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robrwo/class-tie-insideout
Perl "inside-out" objects on the cheap using tied hashes
https://github.com/robrwo/class-tie-insideout
Last synced: 11 days ago
JSON representation
Perl "inside-out" objects on the cheap using tied hashes
- Host: GitHub
- URL: https://github.com/robrwo/class-tie-insideout
- Owner: robrwo
- Created: 2011-06-19T20:25:23.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-09-04T22:21:08.000Z (about 10 years ago)
- Last Synced: 2024-10-11T21:56:34.945Z (about 1 month ago)
- Language: Perl
- Homepage:
- Size: 238 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
Class::Tie::InsideOut - Inside-out objects on the cheap using tied
hashesREQUIREMENTS
Perl 5.6.1, and Scalar::Util.INSTALLATION
Installation can be done using the traditional Makefile.PL method:Using Makefile.PL:
perl Makefile.PL
make test
make installSYNOPSIS
package MyClass;use Class::Tie::InsideOut;
our @ISA = qw( Class::Tie::InsideOut );
our %GoodKey;
sub bad_method {
my $self = shift;
return $self->{BadKey}; # this won't work
}sub good_method {
my $self = shift;
return $self->{GoodKey}; # %GoodKey is defined
}DESCRIPTION
This module is a proof-of-concept for implementing inside-out objects
using tied hashes. It makes use of the Tie::InsideOut package to tie
hash keys to hashes in the calling package's namespace.Fields are accessed as hash keys, so in traditional Perl objects can be
easily converted into inside-out objects.More information can be found in the module documentation.
REVISION HISTORY
A brief list of changes since the previous release:0.11 2014-02-19
- No functional changes to distro.
- Added note about status.
- Removed reference to Build.PL from POD and README.
- Deleted matching version test.
- Added note about Hash::Utils in SEE ALSO section.
0.10 2014-02-19
- No functional changes to distro.
- Reformatted Changes to CPAN::Changes::Spec.
- Changes to use Module::Install for Makefile.PL and removed
Build.PL.
- Modernised distribution for GitHub.For a detailed history see the Changes file included in this
distribution.SEE ALSO
There are various other inside-out object packages on CPAN. Among them:Class::InsideOut
Class::Std
Object::InsideOutAUTHOR
Robert RothenbergAcknowledgements
Thanks to Ovid (via Chromatic) and Steven Little for advice in PerlMonks
on the namespace issues with Class::Accessor.Suggestions and Bug Reporting
Feedback is always welcome. Please use the CPAN Request Tracker at
http://rt.cpan.org to submit bug reports.STATUS
This module has not been seriously updated since 2006, and inside-out
objects have largely fallen out of favor since then.It has been marked as `ADOPTME' on CPAN.
LICENSE
Copyright (c) 2006,2014 Robert Rothenberg. All rights reserved. This
program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.