There are no reviews yet. Be the first to send feedback to the community and the maintainers!
NAME Class::Accessor::Lite - a minimalistic variant of Class::Accessor SYNOPSIS package MyPackage; use Class::Accessor::Lite ( new => 1, rw => [ qw(foo bar) ], ro => [ qw(baz) ], wo => [ qw(hoge) ], ); DESCRIPTION The module is a variant of "Class::Accessor". It is fast and requires less typing, has no dependencies to other modules, and does not mess up the @ISA. THE USE STATEMENT The use statement (i.e. the "import" function) of the module takes a single hash as an argument that specifies the types and the names of the properties. Recognises the following keys. new => $true_or_false the default constructor is created if the value evaluates to true, otherwise nothing is done (the default behaviour) rw => \@name_of_the_properties creates a read / write accessor for the name of the properties passed through as an arrayref ro => \@name_of_the_properties creates a read-only accessor for the name of the properties passed through as an arrayref wo => \@name_of_the_properties creates a write-only accessor for the name of the properties passed through as an arrayref For more detailed explanation read the following section describing the behaviour of each function that actually creates the accessors. FUNCTIONS As of version 0.04 the properties can be specified as the arguments to the "use" statement (as can be seen in the SYNOPSIS) which is now the recommended way of using the module, but for compatibility the following functions are provided as well. Class::Accessor::Lite->mk_accessors(@name_of_the_properties) Creates an accessor in current package under the name specified by the arguments that access the properties (of a hashref) with the same name. Class::Accessor::Lite->mk_ro_accessors(@name_of_the_properties) Same as mk_accessors() except it will generate read-only accessors (i.e. true accessors). If you attempt to set a value with these accessors it will throw an exception. Class::Accessor::Lite->mk_wo_accessors(@name_of_the_properties) Same as mk_accessors() except it will generate write-only accessors (i.e. mutators). If you attempt to read a value with these accessors it will throw an exception. Class::Accessor::Lite->mk_new() Creates the "new" function that accepts a hash or a hashref as the initial properties of the object. Class::Accessor::Lite->mk_new_and_accessors(@name_of_the_properties) DEPRECATED. Use the new "use Class::Accessor::Lite (...)" style. FAQ Can I use "Class::Accessor::Lite" in an inherited module? Yes in most cases, when the class object in the super class is implemented using a hashref. However you _should_ _not_ create the constructor for the inherited class by calling "<Class::Accessor::Lite-"new()>> or by "<use Class::Accessor::Lite (new =" 1)>>. The only other thing that "Class::Accessor::Lite" does is to set up the accessor functions for given property names through a blessed hashref. What happens when passing more than one arguments to the accessor? When the accessor built by Class::Accessor::Lite is given more than one arguments, a reference to the arguments will be saved as an arrayref. This behaviour might not be necessary but is implemented as is to maintain compatibility with Class::Accessor::Fast. my @data = (1, 2, 3); $obj->someproperty(@data); $obj->someproperty->[2]++; # $data[3] is incremented In general, you should pass an arrayref to set an arrayref to a property. my @data = (1, 2, 3); $obj->someproperty([ @data ]); # save a copy using arrayref $obj->someproper->[2]++; # @data is not modified SEE ALSO Class::Accessor Class::Accessor::Lite AUTHORS Copyright (C) 2008 - 2010 Kazuho Oku LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
picojson
a header-file-only, JSON parser serializer in C++picoev
a tiny, lightning fast event loop for network applicationsunco
undo any commandrat
NAT written in pure rubyjailing
super-easy chroot jail builder/runner for Linuxkaztools
shellscripts and utilities for myselfpicohash
header-file-only implementation of various hash algorithmsStarlet
a Plack Server, formerly known as Plack::Server::Standalone::Prefork::Server::StarterC
pseudo-interpreter of the C programming language (using GCC)mysql_json
a MySQL UDF for handling JSONwpbench
benchmark the load timings of a web pagepicogc
a tiny, portable, precise, mark-and-sweep GC in C++p5-Server-Starter
a superdaemon for hot-deploying server programsrangecoder
a fast range coder in C++, using SSEsha1.min.js
SHA-1 implementation in JavaScript (1480 bytes; intended for bookmarklets, etc.)url_compress
a static PPM-based URL compressor / decompressorcppref
man-style access to cppreference.com documentsmod_reproxy
X-Reproxy-URL header support for Apache/2.xp5-http-parser-xs
a fast http parserzson
binary JSON, compact and with support for streamingp5-text-microtemplate
Text::MicroTemplatemysql-ranking-engine
(to become) a MySQL storage engine specializing in ranking operationgolombset
An implementation of Golomb compressed set in Cmanymanythreads
A synthetic benchmark of C10K problem using pthreads or epollcosmic
fail-safe management tools for network-based software RAID, using mdadm + iSCSIp5-test-mysqld
mysqld runner for testskomake
A wrapper of make with sub-make concurrency limitforce-dedupe-git-modules
forcibly dedupe git-based NPM modulesp5-Net-DNS-Lite
pure-perl DNS resolver with support for timeoutdaifuku
transaction logging in JSON, within the MySQL databasep5-Parallel-Scoreboard
A scoreboard for monitoring status of many processesblockdiff
differential backup tool for block devices and filesp5-test-httpd-apache2
Apache2 starter for testing perl modulesp5-Cache-LRU
a simple, fast implementation of an LRU cache in pure perlp5-string-filter
Regexp-based structured text converterkmyacc
http://www005.upp.so-net.ne.jp/kmori/kmyacc/p5-parallel-prefork
picotemplate
a tiny template engine for embedded HTMLnopan
install software directly from SVN or Git (instead of from CPAN)hq
qhashmap
an open-addressing, linear-probing hash table, derived from v8/src/hashmap.hpicostring
simple rope impl. using std::stringadd_with_overflow
an example that links LLVM bitcode and C++ with link-time optimizationApp-Restarter
restart command when files changevisiflate
a dumper for Deflate (RFC 1951); useful for visualizing the algorithmgit-pushdir
pushes the files in current directory to Git repositoryh2-cache-digest
code snippets for h2-cache-digestpuby
draft-kazuho-httpbis-priority
p5-test-postgresql
postgresql runner for testsCGI-Application-Emulate-PSGI
a legacy-code-friendly PSGI adapter for CGI::Applicationmprofile
http://developer.cybozu.co.jp/archives/kazuho/2009/07/mysql-539d.htmlfakeiops
an LD_PRELOAD library for simulating storage systems with various IOPSdraft-kazuho-quic-quic-on-streams
quic-perf-metrics
ieee754.js
Pure-javascript decoder for IEEE 754 floating point numbersjapanize.firefox
Firefox plugin for Japanizeincline
replicator for RDB shardsfriendsd
server of the `friends` program, used at komaba.ecc.u-tokyo.ac.jp from 1996 to 1999benchart
Minimalistic benchmark logger and visualizerp5-Sub-Throttle
SQL-QueryMaker
helper functions for SQL query generationPlack-Middleware-AddDefaultCharset
port of Apache2's AddDefaultCharsetbindlocal
an LD_PRELOAD library that forces servers to listen on 127.0.0.1 instead of 0.0.0.0esDateParser
a date parser compliant to ECMA 262, derived from V8p5-Sub-Timekeeper
calls a function with a stopwatchTest-Mocha-PhantomJS
examples
code snippetskazuho.github.com
draft-kazuho-quic-authenticated-handshake
Authenticated Handshake for QUIC (using ESNI)p5-DBIx-Printf
A printf-style prepared statementaobench.jsx
original: http://kioku.sys-k.net/aobench_jsx/draft-kazuho-quic-address-bound-token
gh-fetch-submodules
fetch the missing submodule contents within a GitHub release tarballkazutils.c
tiny set of C functionsmyfirst-usdt
learning userspace DTraceearly-hints
now part of https://github.com/httpwg/http-extensionsnet.examp1e.picoorm
picoshparser
(experimental) parser of Structured Headersforce-dedupe-git-modules.m2
test repo for https://github.com/kazuho/force-dedupe-git-modulesdraft-kazuho-httpbis-selftrace
force-dedupe-git-modules.m1
test repo for https://github.com/kazuho/force-dedupe-git-modulesprotected-sni
http-cache-fingerprint
cache fingerprint header for HTTPLove Open Source and this site? Check out how you can help us