CINXE.COM
Class::Accessor - Automated accessor generation - metacpan.org
<!DOCTYPE html> <html lang="en-US"> <head> <title>Class::Accessor - Automated accessor generation - metacpan.org</title> <link rel="preload" as="fetch" href="/account/login_status" crossorigin="anonymous" /> <link href="/assets/style-XFEQ536G.css" rel="stylesheet" type="text/css"> <script src="/assets/main-WXBSEDQJ.js" type="module"></script> <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Class-Accessor - MetaCPAN" href="/dist/Class-Accessor/releases.rss" /> <link rel="canonical" href="https://metacpan.org/pod/Class::Accessor" /> <meta name="description" content="Automated accessor generation" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5"> <link rel="shortcut icon" href="/static/icons/favicon.ico"> <link rel="apple-touch-icon" sizes="152x152" href="/static/icons/apple-touch-icon.png"> <link rel="search" href="/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN"> <script async src="https://perl-ads.perlhacks.com/perl-ads.js"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=G-E82Q2V8LVD"></script> <meta property="og:site_name" content="MetaCPAN" /> <meta name="twitter:site" content="@metacpan" /> <meta property="og:type" content="article" /> <meta name="twitter:card" content="summary" /> <meta property="og:url" content="https://metacpan.org/pod/Class::Accessor" /> <meta property="og:title" content="Class::Accessor" /> <meta property="og:description" content="Automated accessor generation" /> <meta property="og:image" content="https://metacpan.org/static/images/dots.png" /> </head> <body> <nav class="navbar navbar-default" role="navigation"> <div class="header-logo-large hidden-xs"> <a href="/" tabindex="0"> <svg class="logo" aria-label="MetaCPAN"> <use class="logo" href="/static/images/metacpan-logo.svg#logo" /> </svg> </a> </div> <div class="header-logo-icon visible-xs"> <a href="/"> <svg class="logo" aria-label="MetaCPAN"> <use class="logo" href="/static/images/metacpan-logo.svg#dots" /> </svg> </a> </div> <ul class="nav navbar-nav menu-items hidden-xs hidden-sm"> <li><a href="/about">About</a></li> <li><a href="/about/sponsors">Sponsor</a></li> <li><a href="https://grep.metacpan.org/">grep::cpan</a></li> <li><a href="/recent">Recent</a></li> <li><a href="/about/faq">FAQ</a></li> <li><a href="/tools">Tools</a></li> <li><a href="https://fastapi.metacpan.org/">API</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <button type="button" class="searchbar-btn visible-xs visible-sm"> <i class="fa fa-search button-fa-icon"></i> </button> <form action="/search" class="searchbar-form visible-md visible-lg search-form form-horizontal"> <input type="hidden" name="size" id="metacpan_search-size" value="20"> <div class="form-group"> <div class="search-group"> <i class="fa fa-search"></i> <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value=""> </div> </div> </form> <li class="icon-slidepanel visible-xs visible-sm"> <button data-toggle="slidepanel" data-target=".slidepanel"> <span class="button-fa-icon"> <i class="fa fa-bars slidepanel-open"></i> <i class="fa fa-times slidepanel-close"></i> </span> </button> </li> <li class="dropdown login-dropdown show-logged-in"> <button type="button" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i> <i class="fas fa-chevron-down"></i> </button> <ul class="dropdown-menu"> <li><a href="/account/identities">Identities</a></li> <li><a href="/account/profile">Profile</a></li> <li><a href="/account/favorite/list">Favorites</a></li> <li> <a href="#" type="button" class="logout-button"> Logout </a> </li> </ul> </li> <li class="dropdown login-dropdown show-logged-out"> <button type="button" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-user button-fa-icon avatar-placeholder" aria-hidden="true"></i> <i class="fas fa-chevron-down"></i> </button> <ul class="dropdown-menu"> <li> <a href="/login/github"> <i class="fab fa-github fa-fw"></i> GitHub </a> </li> <li> <a href="/login/twitter"> <i class="fab fa-twitter fa-fw"></i> Twitter </a> </li> <li> <a href="/login/google"> <i class="fab fa-google fa-fw"></i> Google </a> </li> </ul> </li> <li class="dropdown login-dropdown hide-logged-in hide-logged-out"> <button> <i class="fa fa-user button-fa-icon" aria-hidden="true"></i> </button> </li> </ul> </nav> <div class="page-content "> <div id="perl-ad-target" class="top-notify-banner perl-ad-target"> </div> <nav class="sidebar"> <div class="slidepanel"> <ul class="nav-list "> <li class="nav-header no-margin-top"> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Class-Accessor was released."> <span class="relatize">22 Oct 2017 17:01:15 UTC</span> </div> </li> <li> Distribution: <a href="/dist/Class-Accessor">Class-Accessor</a> </li> <li> Module version: 0.51 </li> <li> <a data-keyboard-shortcut="g s" href="/dist/Class-Accessor/source/lib/Class/Accessor.pm">Source</a> (<a href="/dist/Class-Accessor/source/lib/Class/Accessor.pm?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g b" href="/dist/Class-Accessor/source/lib/Class">Browse</a> (<a href="/dist/Class-Accessor/source/lib/Class?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g c" href="/dist/Class-Accessor/changes">Changes</a> </li> <li> <a class="nopopup" href="/dist/Class-Accessor/contribute">How to Contribute</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Class-Accessor">Issues</a> (2) </li> <li> <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Class-Accessor+0.51" title="Matrix">Testers</a> <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/C/Class-Accessor.html?oncpan=1&distmat=1&version=0.51&grade=2" style="color: #090">2421</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/C/Class-Accessor.html?oncpan=1&distmat=1&version=0.51&grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/C/Class-Accessor.html?oncpan=1&distmat=1&version=0.51&grade=4">0</a>)</span> </li> <li> <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/KASEI/Class-Accessor-0.51">Kwalitee</a> </li> <li> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Class-Accessor who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)"> Bus factor: 1 </div> </li> <li> <a rel="noopener nofollow" href="http://cpancover.com/latest/Class-Accessor-0.51/index.html">80.73% Coverage </a> </li> <li> License: perl_5 </li> <li class="nav-header">Activity</li> <li> <div class="activity-graph"> <img src="/dist/Class-Accessor/activity.svg?res=month" /> <div class="comment">24 month</div> </div> </li> <li class="nav-header">Tools</li> <li> <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/K/KA/KASEI/Class-Accessor-0.51.tar.gz"> Download (<span itemprop="fileSize">12.71KB</span>)</a> </li> <li> <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FKASEI%2FClass-Accessor-0.51%2Flib%2FClass%2FAccessor.pm"> MetaCPAN Explorer </a> </li> <li> <a href="/dist/Class-Accessor/permissions"> Permissions </a> </li> <li> <a href="/dist/Class-Accessor/releases.rss"> Subscribe to distribution </a> </li> <li> <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog"> Install Instructions </button> </li> <li> <form action="/search"> <input type="hidden" name="q" value="dist:Class-Accessor"> <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form"> <input type="submit" style="display: none"> </form> </li> <li> <form action="https://grep.metacpan.org/search"> <input type="hidden" name="qd" value="Class-Accessor"> <input type="hidden" name="source" value="metacpan"> <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form"> <input type="submit" style="display: none"> </form> </li> <li class="version-jump"> <select class="select-navigator form-control tool-bar-form"> <option disabled selected>Jump to version</option> <option disabled value="/release/KASEI/Class-Accessor-0.51/view/lib/Class/Accessor.pm" >0.51 (KASEI on 2017-10-22)</option> <option value="/release/KASEI/Class-Accessor-0.34/view/lib/Class/Accessor.pm" >0.34 (KASEI on 2009-09-15)</option> <optgroup label="BackPAN">' <option value="/release/KASEI/Class-Accessor-0.50/view/lib/Class/Accessor.pm" >0.50 (KASEI on 2017-10-22)</option> <option value="/release/KASEI/Class-Accessor-0.33/view/lib/Class/Accessor.pm" >0.33 (KASEI on 2009-05-04)</option> <option value="/release/KASEI/Class-Accessor-0.31/view/lib/Class/Accessor.pm" >0.31 (KASEI on 2007-07-11)</option> <option value="/release/KASEI/Class-Accessor-0.30/view/lib/Class/Accessor.pm" >0.30 (KASEI on 2006-11-26)</option> <option value="/release/KASEI/Class-Accessor-0.27/view/lib/Class/Accessor.pm" >0.27 (KASEI on 2006-07-19)</option> <option value="/release/KASEI/Class-Accessor-0.25/view/lib/Class/Accessor.pm" >0.25 (KASEI on 2006-03-31)</option> <option value="/release/KASEI/Class-Accessor-0.22/view/lib/Class/Accessor.pm" >0.22 (KASEI on 2005-09-05)</option> <option value="/release/KASEI/Class-Accessor-0.21/view/lib/Class/Accessor.pm" >0.21 (KASEI on 2005-09-01)</option> <option value="/release/KASEI/Class-Accessor-0.20/view/lib/Class/Accessor.pm" >0.20 (KASEI on 2005-09-01)</option> <option value="/release/KASEI/Class-Accessor-0.19/view/lib/Class/Accessor.pm" >0.19 (KASEI on 2004-03-02)</option> <option value="/release/KASEI/Class-Accessor-0.18/view/lib/Class/Accessor.pm" >0.18 (KASEI on 2003-04-03)</option> <option value="/release/MSCHWERN/Class-Accessor-0.17/view/lib/Class/Accessor.pm" >0.17 (MSCHWERN on 2001-04-02)</option> <option value="/release/MSCHWERN/Class-Accessor-0.16/view/lib/Class/Accessor.pm" >0.16 (MSCHWERN on 2000-12-14)</option> <option value="/release/MSCHWERN/Class-Accessor-0.15/view/lib/Class/Accessor.pm" >0.15 (MSCHWERN on 2000-08-18)</option> <option value="/release/MSCHWERN/Class-Accessor-0.13/view/lib/Class/Accessor.pm" >0.13 (MSCHWERN on 2000-04-25)</option> <option value="/release/MSCHWERN/Class-Accessor-0.12/view/lib/Class/Accessor.pm" >0.12 (MSCHWERN on 2000-04-18)</option> <option value="/release/MSCHWERN/Class-Accessor-0.11/view/lib/Class/Accessor.pm" >0.11 (MSCHWERN on 2000-04-17)</option> <option value="/release/MSCHWERN/Class-Accessor-0.02/view/lib/Class/Accessor.pm" >0.02 (MSCHWERN on 1999-12-14)</option> </optgroup> </select> </li> <li class="version-diff"> <select class="select-navigator form-control tool-bar-form"> <option disabled selected>Diff with version</option> <option disabled value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.51/lib/Class/Accessor.pm" >0.51 (KASEI on 2017-10-22)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.34/lib/Class/Accessor.pm" >0.34 (KASEI on 2009-09-15)</option> <optgroup label="BackPAN">' <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.50/lib/Class/Accessor.pm" >0.50 (KASEI on 2017-10-22)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.33/lib/Class/Accessor.pm" >0.33 (KASEI on 2009-05-04)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.31/lib/Class/Accessor.pm" >0.31 (KASEI on 2007-07-11)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.30/lib/Class/Accessor.pm" >0.30 (KASEI on 2006-11-26)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.27/lib/Class/Accessor.pm" >0.27 (KASEI on 2006-07-19)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.25/lib/Class/Accessor.pm" >0.25 (KASEI on 2006-03-31)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.22/lib/Class/Accessor.pm" >0.22 (KASEI on 2005-09-05)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.21/lib/Class/Accessor.pm" >0.21 (KASEI on 2005-09-01)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.20/lib/Class/Accessor.pm" >0.20 (KASEI on 2005-09-01)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.19/lib/Class/Accessor.pm" >0.19 (KASEI on 2004-03-02)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/KASEI/Class-Accessor-0.18/lib/Class/Accessor.pm" >0.18 (KASEI on 2003-04-03)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/MSCHWERN/Class-Accessor-0.17/lib/Class/Accessor.pm" >0.17 (MSCHWERN on 2001-04-02)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/MSCHWERN/Class-Accessor-0.16/lib/Class/Accessor.pm" >0.16 (MSCHWERN on 2000-12-14)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/MSCHWERN/Class-Accessor-0.15/lib/Class/Accessor.pm" >0.15 (MSCHWERN on 2000-08-18)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/MSCHWERN/Class-Accessor-0.13/lib/Class/Accessor.pm" >0.13 (MSCHWERN on 2000-04-25)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/MSCHWERN/Class-Accessor-0.12/lib/Class/Accessor.pm" >0.12 (MSCHWERN on 2000-04-18)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/MSCHWERN/Class-Accessor-0.11/lib/Class/Accessor.pm" >0.11 (MSCHWERN on 2000-04-17)</option> <option value="/release/KASEI/Class-Accessor-0.51/diff/MSCHWERN/Class-Accessor-0.02/lib/Class/Accessor.pm" >0.02 (MSCHWERN on 1999-12-14)</option> </optgroup> </select> </li> <li> <ul class="dependencies"> <li class="nav-header">Dependencies</li> <li><a href="/pod/base" title="base" class="ellipsis">base</a></li> <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li> <li> <hr> </li> <li> <a href="/module/Class::Accessor/requires">Reverse dependencies</a> </li> <li> <a href="http://deps.cpantesters.org/?module=Class%3A%3AAccessor">CPAN Testers List</a> </li> <li> <a href="https://cpandeps.grinnz.com/?dist=Class-Accessor">Dependency graph</a> </li> </ul> </li> <li class="nav-header">Permalinks</li> <li> <a href="/release/KASEI/Class-Accessor-0.51/view/lib/Class/Accessor.pm">This version</a> </li> <li> <a href="/pod/Class::Accessor">Latest version</a> </li> <li> <div class="plussers"> <div class="nav-header">++ed by:</div> <div> <a class="display-all" href="/author/ARJONES"><img src="https://www.gravatar.com/avatar/779fdd029141571e2650d9060978c1a1?d=identicon&s=20" title="ARJONES" alt="ARJONES"></a> <a class="display-all" href="/author/ILUX"><img src="https://www.gravatar.com/avatar/1cd0eea5e6ca13346060bb9d2c1e286b?d=identicon&s=20" title="ILUX" alt="ILUX"></a> <a class="display-all" href="/author/JONASBN"><img src="https://www.gravatar.com/avatar/1b053b414cecd279ef44423c75b3d227?d=identicon&s=20" title="JONASBN" alt="JONASBN"></a> <a class="display-all" href="/author/MISHIN"><img src="https://www.gravatar.com/avatar/7aefe037fc617ef89780ad89de3deb87?d=identicon&s=20" title="MISHIN" alt="MISHIN"></a> <a class="display-all" href="/author/KES"><img src="https://www.gravatar.com/avatar/e8530f00b43b4f6a056f8ad4ee52ea47?d=identicon&s=20" title="KES" alt="KES"></a> </div> <!-- Display counts of plussers--> <div> <a href="/dist/Class-Accessor/plussers">10 PAUSE users</a> </div> <div> 10 non-PAUSE users </div> </div> </li> <li> <div> <button class="contributors-show-button btn-link">and 1 contributors</button> <div id="metacpan_contributors" class="slide-out slide-out-hidden"> <div> <ul> <li class="contributor" data-contrib-email="marty+perl@martian.org" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&s=20" /> Marty Pauley </li> </ul> </div> </div> </div> </li> </ul> </div> </nav> <div class="content-navigation"> <div class="breadcrumbs"> <span> <a data-keyboard-shortcut="g a" rel="author" href="/author/KASEI" class="author-name">Marty Pauley</a> </span> <span> / </span> <div class="release dist-release status-latest maturity-released"> <span class="dropdown"><b class="caret"></b></span> <select class="select-navigator "> <option selected value="/release/KASEI/Class-Accessor-0.51/view/lib/Class/Accessor.pm" >0.51 (KASEI on 2017-10-22)</option> <option value="/release/KASEI/Class-Accessor-0.34/view/lib/Class/Accessor.pm" >0.34 (KASEI on 2009-09-15)</option> <optgroup label="BackPAN">' <option value="/release/KASEI/Class-Accessor-0.50/view/lib/Class/Accessor.pm" >0.50 (KASEI on 2017-10-22)</option> <option value="/release/KASEI/Class-Accessor-0.33/view/lib/Class/Accessor.pm" >0.33 (KASEI on 2009-05-04)</option> <option value="/release/KASEI/Class-Accessor-0.31/view/lib/Class/Accessor.pm" >0.31 (KASEI on 2007-07-11)</option> <option value="/release/KASEI/Class-Accessor-0.30/view/lib/Class/Accessor.pm" >0.30 (KASEI on 2006-11-26)</option> <option value="/release/KASEI/Class-Accessor-0.27/view/lib/Class/Accessor.pm" >0.27 (KASEI on 2006-07-19)</option> <option value="/release/KASEI/Class-Accessor-0.25/view/lib/Class/Accessor.pm" >0.25 (KASEI on 2006-03-31)</option> <option value="/release/KASEI/Class-Accessor-0.22/view/lib/Class/Accessor.pm" >0.22 (KASEI on 2005-09-05)</option> <option value="/release/KASEI/Class-Accessor-0.21/view/lib/Class/Accessor.pm" >0.21 (KASEI on 2005-09-01)</option> <option value="/release/KASEI/Class-Accessor-0.20/view/lib/Class/Accessor.pm" >0.20 (KASEI on 2005-09-01)</option> <option value="/release/KASEI/Class-Accessor-0.19/view/lib/Class/Accessor.pm" >0.19 (KASEI on 2004-03-02)</option> <option value="/release/KASEI/Class-Accessor-0.18/view/lib/Class/Accessor.pm" >0.18 (KASEI on 2003-04-03)</option> <option value="/release/MSCHWERN/Class-Accessor-0.17/view/lib/Class/Accessor.pm" >0.17 (MSCHWERN on 2001-04-02)</option> <option value="/release/MSCHWERN/Class-Accessor-0.16/view/lib/Class/Accessor.pm" >0.16 (MSCHWERN on 2000-12-14)</option> <option value="/release/MSCHWERN/Class-Accessor-0.15/view/lib/Class/Accessor.pm" >0.15 (MSCHWERN on 2000-08-18)</option> <option value="/release/MSCHWERN/Class-Accessor-0.13/view/lib/Class/Accessor.pm" >0.13 (MSCHWERN on 2000-04-25)</option> <option value="/release/MSCHWERN/Class-Accessor-0.12/view/lib/Class/Accessor.pm" >0.12 (MSCHWERN on 2000-04-18)</option> <option value="/release/MSCHWERN/Class-Accessor-0.11/view/lib/Class/Accessor.pm" >0.11 (MSCHWERN on 2000-04-17)</option> <option value="/release/MSCHWERN/Class-Accessor-0.02/view/lib/Class/Accessor.pm" >0.02 (MSCHWERN on 1999-12-14)</option> </optgroup> </select> <a data-keyboard-shortcut="g d" class="release-name" href="/dist/Class-Accessor">Class-Accessor-0.51</a> </div> <span class="river-gauge-gauge"> <svg width="24px" height="15px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g> <title> River stage four • 665 direct dependents • 1992 total dependents </title> <rect x="0" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="5" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="10" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="15" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="20" y="0" width="4" height="15" fill="#e4e2e2" /> </g> </svg> </span> <div id="Class-Accessor-fav" class="show-logged-in"> <form action="/account/favorite/add" style="display: inline" method="POST"> <input type="hidden" name="remove" value="0"> <input type="hidden" name="release" value="Class-Accessor-0.51"> <input type="hidden" name="author" value="KASEI"> <input type="hidden" name="distribution" value="Class-Accessor"> <button type="submit" class="favorite highlight"><span>20</span> ++</button> </form> </div> <div class="show-logged-out"> <button class="fav-not-logged-in favorite highlight"><span>20</span> ++</button> </div> / <span>Class::Accessor</span> </div> </div> <main class="content"> <nav class="toc"> <div class="toc-header"><strong>Contents</strong></div> <ul> <li><a href="#NAME">NAME</a></li> <li><a href="#SYNOPSIS">SYNOPSIS</a></li> <li><a href="#DESCRIPTION">DESCRIPTION</a> <ul> <li><a href="#Moose-like">Moose-like</a></li> </ul> </li> <li><a href="#CONSTRUCTOR">CONSTRUCTOR</a> <ul> <li><a href="#new">new</a></li> </ul> </li> <li><a href="#MAKING-ACCESSORS">MAKING ACCESSORS</a> <ul> <li><a href="#follow_best_practice">follow_best_practice</a></li> <li><a href="#accessor_name_for-%2F-mutator_name_for">accessor_name_for / mutator_name_for</a></li> <li><a href="#mk_accessors">mk_accessors</a></li> <li><a href="#mk_ro_accessors">mk_ro_accessors</a></li> <li><a href="#mk_wo_accessors">mk_wo_accessors</a></li> </ul> </li> <li><a href="#Moose!">Moose!</a></li> <li><a href="#DETAILS">DETAILS</a> <ul> <li><a href="#Modifying-the-behavior-of-the-accessor">Modifying the behavior of the accessor</a></li> <li><a href="#set">set</a></li> <li><a href="#get">get</a></li> <li><a href="#make_accessor">make_accessor</a></li> <li><a href="#make_ro_accessor">make_ro_accessor</a></li> <li><a href="#make_wo_accessor">make_wo_accessor</a></li> </ul> </li> <li><a href="#EXCEPTIONS">EXCEPTIONS</a></li> <li><a href="#EFFICIENCY">EFFICIENCY</a></li> <li><a href="#EXAMPLES">EXAMPLES</a></li> <li><a href="#CAVEATS-AND-TRICKS">CAVEATS AND TRICKS</a> <ul> <li><a href="#Don%27t-make-a-field-called-DESTROY">Don't make a field called DESTROY</a></li> <li><a href="#Overriding-autogenerated-accessors">Overriding autogenerated accessors</a></li> </ul> </li> <li><a href="#AUTHORS">AUTHORS</a> <ul> <li><a href="#ORIGINAL-AUTHOR">ORIGINAL AUTHOR</a></li> <li><a href="#THANKS">THANKS</a></li> </ul> </li> <li><a href="#SEE-ALSO">SEE ALSO</a></li> </ul></nav> <div class="pod anchors"> <h1 id="NAME">NAME</h1> <pre><code>Class::Accessor - Automated accessor generation</code></pre> <h1 id="SYNOPSIS">SYNOPSIS</h1> <pre><code>package Foo; use base qw(Class::Accessor); Foo->follow_best_practice; Foo->mk_accessors(qw(name role salary)); # or if you prefer a Moose-like interface... package Foo; use Class::Accessor "antlers"; has name => ( is => "rw", isa => "Str" ); has role => ( is => "rw", isa => "Str" ); has salary => ( is => "rw", isa => "Num" ); # Meanwhile, in a nearby piece of code! # Class::Accessor provides new(). my $mp = Foo->new({ name => "Marty", role => "JAPH" }); my $job = $mp->role; # gets $mp->{role} $mp->salary(400000); # sets $mp->{salary} = 400000 # I wish # like my @info = @{$mp}{qw(name role)} my @info = $mp->get(qw(name role)); # $mp->{salary} = 400000 $mp->set('salary', 400000);</code></pre> <h1 id="DESCRIPTION">DESCRIPTION</h1> <p>This module automagically generates accessors/mutators for your class.</p> <p>Most of the time, writing accessors is an exercise in cutting and pasting. You usually wind up with a series of methods like this:</p> <pre><code> sub name { my $self = shift; if(@_) { $self->{name} = $_[0]; } return $self->{name}; } sub salary { my $self = shift; if(@_) { $self->{salary} = $_[0]; } return $self->{salary}; } # etc...</code></pre> <p>One for each piece of data in your object. While some will be unique, doing value checks and special storage tricks, most will simply be exercises in repetition. Not only is it Bad Style to have a bunch of repetitious code, but it's also simply not lazy, which is the real tragedy.</p> <p>If you make your module a subclass of Class::Accessor and declare your accessor fields with mk_accessors() then you'll find yourself with a set of automatically generated accessors which can even be customized!</p> <p>The basic set up is very simple:</p> <pre><code>package Foo; use base qw(Class::Accessor); Foo->mk_accessors( qw(far bar car) );</code></pre> <p>Done. Foo now has simple far(), bar() and car() accessors defined.</p> <p>Alternatively, if you want to follow Damian's <i>best practice</i> guidelines you can use:</p> <pre><code>package Foo; use base qw(Class::Accessor); Foo->follow_best_practice; Foo->mk_accessors( qw(far bar car) );</code></pre> <p><b>Note:</b> you must call <code>follow_best_practice</code> before calling <code>mk_accessors</code>.</p> <h2 id="Moose-like"><a id="Moose"></a>Moose-like</h2> <p>By popular demand we now have a simple Moose-like interface. You can now do:</p> <pre><code>package Foo; use Class::Accessor "antlers"; has far => ( is => "rw" ); has bar => ( is => "rw" ); has car => ( is => "rw" );</code></pre> <p>Currently only the <code>is</code> attribute is supported.</p> <h1 id="CONSTRUCTOR">CONSTRUCTOR</h1> <p>Class::Accessor provides a basic constructor, <code>new</code>. It generates a hash-based object and can be called as either a class method or an object method.</p> <h2 id="new">new</h2> <pre><code>my $obj = Foo->new; my $obj = $other_obj->new; my $obj = Foo->new(\%fields); my $obj = $other_obj->new(\%fields);</code></pre> <p>It takes an optional %fields hash which is used to initialize the object (handy if you use read-only accessors). The fields of the hash correspond to the names of your accessors, so...</p> <pre><code>package Foo; use base qw(Class::Accessor); Foo->mk_accessors('foo'); my $obj = Foo->new({ foo => 42 }); print $obj->foo; # 42</code></pre> <p>however %fields can contain anything, new() will shove them all into your object.</p> <h1 id="MAKING-ACCESSORS"><a id="MAKING"></a>MAKING ACCESSORS</h1> <h2 id="follow_best_practice">follow_best_practice</h2> <p>In Damian's Perl Best Practices book he recommends separate get and set methods with the prefix set_ and get_ to make it explicit what you intend to do. If you want to create those accessor methods instead of the default ones, call:</p> <pre><code>__PACKAGE__->follow_best_practice</code></pre> <p><b>before</b> you call any of the accessor-making methods.</p> <h2 id="accessor_name_for-/-mutator_name_for"><a id="accessor_name_for"></a><a id="accessor_name_for-mutator_name_for"></a>accessor_name_for / mutator_name_for</h2> <p>You may have your own crazy ideas for the names of the accessors, so you can make those happen by overriding <code>accessor_name_for</code> and <code>mutator_name_for</code> in your subclass. (I copied that idea from Class::DBI.)</p> <h2 id="mk_accessors">mk_accessors</h2> <pre><code>__PACKAGE__->mk_accessors(@fields);</code></pre> <p>This creates accessor/mutator methods for each named field given in @fields. Foreach field in @fields it will generate two accessors. One called "field()" and the other called "_field_accessor()". For example:</p> <pre><code># Generates foo(), _foo_accessor(), bar() and _bar_accessor(). __PACKAGE__->mk_accessors(qw(foo bar));</code></pre> <p>See <a href="/pod/CAVEATS AND TRICKS#Overriding-autogenerated-accessors">"Overriding autogenerated accessors" in CAVEATS AND TRICKS</a> for details.</p> <h2 id="mk_ro_accessors">mk_ro_accessors</h2> <pre><code>__PACKAGE__->mk_ro_accessors(@read_only_fields);</code></pre> <p>Same as mk_accessors() except it will generate read-only accessors (ie. true accessors). If you attempt to set a value with these accessors it will throw an exception. It only uses get() and not set().</p> <pre><code>package Foo; use base qw(Class::Accessor); Foo->mk_ro_accessors(qw(foo bar)); # Let's assume we have an object $foo of class Foo... print $foo->foo; # ok, prints whatever the value of $foo->{foo} is $foo->foo(42); # BOOM! Naughty you.</code></pre> <h2 id="mk_wo_accessors">mk_wo_accessors</h2> <pre><code>__PACKAGE__->mk_wo_accessors(@write_only_fields);</code></pre> <p>Same as mk_accessors() except it will generate write-only accessors (ie. mutators). If you attempt to read a value with these accessors it will throw an exception. It only uses set() and not get().</p> <p><b>NOTE</b> I'm not entirely sure why this is useful, but I'm sure someone will need it. If you've found a use, let me know. Right now it's here for orthogonality and because it's easy to implement.</p> <pre><code>package Foo; use base qw(Class::Accessor); Foo->mk_wo_accessors(qw(foo bar)); # Let's assume we have an object $foo of class Foo... $foo->foo(42); # OK. Sets $self->{foo} = 42 print $foo->foo; # BOOM! Can't read from this accessor.</code></pre> <h1 id="Moose!"><a id="Moose1"></a>Moose!</h1> <p>If you prefer a Moose-like interface to create accessors, you can use <code>has</code> by importing this module like this:</p> <pre><code>use Class::Accessor "antlers";</code></pre> <p>or</p> <pre><code>use Class::Accessor "moose-like";</code></pre> <p>Then you can declare accessors like this:</p> <pre><code>has alpha => ( is => "rw", isa => "Str" ); has beta => ( is => "ro", isa => "Str" ); has gamma => ( is => "wo", isa => "Str" );</code></pre> <p>Currently only the <code>is</code> attribute is supported. And our <code>is</code> also supports the "wo" value to make a write-only accessor.</p> <p>If you are using the Moose-like interface then you should use the <code>extends</code> rather than tweaking your <code>@ISA</code> directly. Basically, replace</p> <pre><code>@ISA = qw/Foo Bar/;</code></pre> <p>with</p> <pre><code>extends(qw/Foo Bar/);</code></pre> <h1 id="DETAILS">DETAILS</h1> <p>An accessor generated by Class::Accessor looks something like this:</p> <pre><code># Your foo may vary. sub foo { my($self) = shift; if(@_) { # set return $self->set('foo', @_); } else { return $self->get('foo'); } }</code></pre> <p>Very simple. All it does is determine if you're wanting to set a value or get a value and calls the appropriate method. Class::Accessor provides default get() and set() methods which your class can override. They're detailed later.</p> <h2 id="Modifying-the-behavior-of-the-accessor"><a id="Modifying"></a>Modifying the behavior of the accessor</h2> <p>Rather than actually modifying the accessor itself, it is much more sensible to simply override the two key methods which the accessor calls. Namely set() and get().</p> <p>If you -really- want to, you can override make_accessor().</p> <h2 id="set">set</h2> <pre><code>$obj->set($key, $value); $obj->set($key, @values);</code></pre> <p>set() defines how generally one stores data in the object.</p> <p>override this method to change how data is stored by your accessors.</p> <h2 id="get">get</h2> <pre><code>$value = $obj->get($key); @values = $obj->get(@keys);</code></pre> <p>get() defines how data is retrieved from your objects.</p> <p>override this method to change how it is retrieved.</p> <h2 id="make_accessor">make_accessor</h2> <pre><code>$accessor = __PACKAGE__->make_accessor($field);</code></pre> <p>Generates a subroutine reference which acts as an accessor for the given $field. It calls get() and set().</p> <p>If you wish to change the behavior of your accessors, try overriding get() and set() before you start mucking with make_accessor().</p> <h2 id="make_ro_accessor">make_ro_accessor</h2> <pre><code>$read_only_accessor = __PACKAGE__->make_ro_accessor($field);</code></pre> <p>Generates a subroutine reference which acts as a read-only accessor for the given $field. It only calls get().</p> <p>Override get() to change the behavior of your accessors.</p> <h2 id="make_wo_accessor">make_wo_accessor</h2> <pre><code>$write_only_accessor = __PACKAGE__->make_wo_accessor($field);</code></pre> <p>Generates a subroutine reference which acts as a write-only accessor (mutator) for the given $field. It only calls set().</p> <p>Override set() to change the behavior of your accessors.</p> <h1 id="EXCEPTIONS">EXCEPTIONS</h1> <p>If something goes wrong Class::Accessor will warn or die by calling Carp::carp or Carp::croak. If you don't like this you can override _carp() and _croak() in your subclass and do whatever else you want.</p> <h1 id="EFFICIENCY">EFFICIENCY</h1> <p>Class::Accessor does not employ an autoloader, thus it is much faster than you'd think. Its generated methods incur no special penalty over ones you'd write yourself.</p> <pre><code>accessors: Rate Basic Fast Faster Direct Basic 367589/s -- -51% -55% -89% Fast 747964/s 103% -- -9% -77% Faster 819199/s 123% 10% -- -75% Direct 3245887/s 783% 334% 296% -- mutators: Rate Acc Fast Faster Direct Acc 265564/s -- -54% -63% -91% Fast 573439/s 116% -- -21% -80% Faster 724710/s 173% 26% -- -75% Direct 2860979/s 977% 399% 295% --</code></pre> <p>Class::Accessor::Fast is faster than methods written by an average programmer (where "average" is based on Schwern's example code).</p> <p>Class::Accessor is slower than average, but more flexible.</p> <p>Class::Accessor::Faster is even faster than Class::Accessor::Fast. It uses an array internally, not a hash. This could be a good or bad feature depending on your point of view.</p> <p>Direct hash access is, of course, much faster than all of these, but it provides no encapsulation.</p> <p>Of course, it's not as simple as saying "Class::Accessor is slower than average". These are benchmarks for a simple accessor. If your accessors do any sort of complicated work (such as talking to a database or writing to a file) the time spent doing that work will quickly swamp the time spend just calling the accessor. In that case, Class::Accessor and the ones you write will be roughly the same speed.</p> <h1 id="EXAMPLES">EXAMPLES</h1> <p>Here's an example of generating an accessor for every public field of your class.</p> <pre><code>package Altoids; use base qw(Class::Accessor Class::Fields); use fields qw(curiously strong mints); Altoids->mk_accessors( Altoids->show_fields('Public') ); sub new { my $proto = shift; my $class = ref $proto || $proto; return fields::new($class); } my Altoids $tin = Altoids->new; $tin->curiously('Curiouser and curiouser'); print $tin->{curiously}; # prints 'Curiouser and curiouser' # Subclassing works, too. package Mint::Snuff; use base qw(Altoids); my Mint::Snuff $pouch = Mint::Snuff->new; $pouch->strong('Blow your head off!'); print $pouch->{strong}; # prints 'Blow your head off!'</code></pre> <p>Here's a simple example of altering the behavior of your accessors.</p> <pre><code>package Foo; use base qw(Class::Accessor); Foo->mk_accessors(qw(this that up down)); sub get { my $self = shift; # Note every time someone gets some data. print STDERR "Getting @_\n"; $self->SUPER::get(@_); } sub set { my ($self, $key) = splice(@_, 0, 2); # Note every time someone sets some data. print STDERR "Setting $key to @_\n"; $self->SUPER::set($key, @_); }</code></pre> <h1 id="CAVEATS-AND-TRICKS"><a id="CAVEATS"></a>CAVEATS AND TRICKS</h1> <p>Class::Accessor has to do some internal wackiness to get its job done quickly and efficiently. Because of this, there's a few tricks and traps one must know about.</p> <p>Hey, nothing's perfect.</p> <h2 id="Don't-make-a-field-called-DESTROY"><a id="Don"></a><a id="Dont-make-a-field-called-DESTROY"></a>Don't make a field called DESTROY</h2> <p>This is bad. Since DESTROY is a magical method it would be bad for us to define an accessor using that name. Class::Accessor will carp if you try to use it with a field named "DESTROY".</p> <h2 id="Overriding-autogenerated-accessors"><a id="Overriding"></a>Overriding autogenerated accessors</h2> <p>You may want to override the autogenerated accessor with your own, yet have your custom accessor call the default one. For instance, maybe you want to have an accessor which checks its input. Normally, one would expect this to work:</p> <pre><code>package Foo; use base qw(Class::Accessor); Foo->mk_accessors(qw(email this that whatever)); # Only accept addresses which look valid. sub email { my($self) = shift; my($email) = @_; if( @_ ) { # Setting require Email::Valid; unless( Email::Valid->address($email) ) { carp("$email doesn't look like a valid address."); return; } } return $self->SUPER::email(@_); }</code></pre> <p>There's a subtle problem in the last example, and it's in this line:</p> <pre><code>return $self->SUPER::email(@_);</code></pre> <p>If we look at how Foo was defined, it called mk_accessors() which stuck email() right into Foo's namespace. There *is* no SUPER::email() to delegate to! Two ways around this... first is to make a "pure" base class for Foo. This pure class will generate the accessors and provide the necessary super class for Foo to use:</p> <pre><code>package Pure::Organic::Foo; use base qw(Class::Accessor); Pure::Organic::Foo->mk_accessors(qw(email this that whatever)); package Foo; use base qw(Pure::Organic::Foo);</code></pre> <p>And now Foo::email() can override the generated Pure::Organic::Foo::email() and use it as SUPER::email().</p> <p>This is probably the most obvious solution to everyone but me. Instead, what first made sense to me was for mk_accessors() to define an alias of email(), _email_accessor(). Using this solution, Foo::email() would be written with:</p> <pre><code>return $self->_email_accessor(@_);</code></pre> <p>instead of the expected SUPER::email().</p> <h1 id="AUTHORS">AUTHORS</h1> <p>Copyright 2017 Marty Pauley <marty+perl@martian.org></p> <p>This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. That means either (a) the GNU General Public License or (b) the Artistic License.</p> <h2 id="ORIGINAL-AUTHOR"><a id="ORIGINAL"></a>ORIGINAL AUTHOR</h2> <p>Michael G Schwern <schwern@pobox.com></p> <h2 id="THANKS">THANKS</h2> <p>Liz and RUZ for performance tweaks.</p> <p>Tels, for his big feature request/bug report.</p> <p>Various presenters at YAPC::Asia 2009 for criticising the non-Moose interface.</p> <h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1> <p>See <a href="/pod/Class::Accessor::Fast">Class::Accessor::Fast</a> and <a href="/pod/Class::Accessor::Faster">Class::Accessor::Faster</a> if speed is more important than flexibility.</p> <p>These are some modules which do similar things in different ways <a href="/pod/Class::Struct">Class::Struct</a>, <a href="/pod/Class::Methodmaker">Class::Methodmaker</a>, <a href="/pod/Class::Generate">Class::Generate</a>, <a href="/pod/Class::Class">Class::Class</a>, <a href="/pod/Class::Contract">Class::Contract</a>, <a href="/pod/Moose">Moose</a>, <a href="/pod/Mouse">Mouse</a></p> <p>See <a href="/pod/Class::DBI">Class::DBI</a> for an example of this module in use.</p></div> <div id="metacpan_install-instructions-dialog" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Module Install Instructions</h4> </div> <div class="modal-body"> <p>To install Class::Accessor, copy and paste the appropriate command in to your terminal.</p> <p><a href="/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p> <pre><code>cpanm Class::Accessor</code></pre> <p><a href="/pod/CPAN">CPAN shell</a></p> <pre><code>perl -MCPAN -e shell install Class::Accessor</code></pre> <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p> </div> <div class="modal-footer"> <a href="#" data-dismiss="modal" class="btn">Close</a> </div> </div> </div> </div> </main> <div class="content-pagination"> </div> </div> <footer class="footer"> <div class="footer-container"> <div class="footer-social"> <div class="footer-link footer-logo"> <a href="/"> <img src="/static/images/metacpan-logo.svg" alt="MetaCPAN" /> </a> </div> <a class="footer-social-link" href="https://github.com/metacpan"> <i class="fab fa-github-square"></i> </a> <a class="footer-social-link" href="https://fosstodon.org/@metacpan"> <i class="fab fa-mastodon"></i> </a> </div> <div class="footer-links"> <div class="footer-link"> <a href="/about">About</a> </div> <div class="footer-link"> <a href="/about/sponsors">Sponsor</a> </div> <div class="footer-link"> <a href="https://grep.metacpan.org">grep::cpan</a> </div> <div class="footer-link"> <a href="/recent">Recent</a> </div> <div class="footer-link"> <a href="/about/faq">FAQ</a> </div> <div class="footer-link"> <a href="/tools">Tools</a> </div> <div class="footer-link"> <a href="https://fastapi.metacpan.org/">API</a> </div> <div class="footer-link"> <a href="https://www.perl.org/">Perl.org</a> </div> </div> <div class="footer-sponsors"> <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener"> <img class="footer-sponsor-bytemark" src="/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener"> <img class="footer-sponsor-liquidweb" src="/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener"> <img class="footer-sponsor-deriv" src="/static/images/sponsors/deriv.svg" alt="Deriv logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener"> <img class="footer-sponsor-geocode" src="/static/images/sponsors/geocodelogo.svg" alt="Geocode logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener"> <img class="footer-sponsor-fastly" src="/static/images/sponsors/fastly_logo.svg" alt="Fastly logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener"> <img class="footer-sponsor-opencage" src="/static/images/sponsors/open-cage.svg" alt="OpenCage logo"> </a> <!-- Added 2024-07-22 --> <a class="footer-sponsor-link" target="_blank" href="https://www.elastic.co/" rel="noopener"> <img class="footer-sponsor-elastic" src="/static/images/sponsors/elastic.svg" alt="Elastic logo"> </a> <!-- Added 2024-07-22 --> <a class="footer-sponsor-link" target="_blank" href="https://route4me.com/" rel="noopener"> <img class="footer-sponsor-route4me" src="/static/images/sponsors/route4me.png" alt="Route4Me logo"> </a> </div> </div> </footer> <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Keyboard Shortcuts</h4> </div> <div class="modal-body row"> <div class="col-md-6"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>Global</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>s</kbd> </td> <td>Focus search bar</td> </tr> <tr> <td class="keys"> <kbd>?</kbd> </td> <td>Bring up this help dialog</td> </tr> </tbody> </table> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>GitHub</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>g</kbd> <kbd>p</kbd> </td> <td>Go to pull requests</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>i</kbd> </td> <td>go to github issues (only if github is preferred repository)</td> </tr> </tbody> </table> </div> <div class="col-md-6"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>POD</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>g</kbd> <kbd>a</kbd> </td> <td>Go to author</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>c</kbd> </td> <td>Go to changes</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>i</kbd> </td> <td>Go to issues</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>d</kbd> </td> <td>Go to dist</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>r</kbd> </td> <td>Go to repository/SCM</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>s</kbd> </td> <td>Go to source</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>b</kbd> </td> <td>Go to file browse</td> </tr> </tbody> </table> </div> <div class="col-md-12"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>Search terms</th> </tr> </thead> <tbody> <tr> <td><em>module:</em> (e.g. <a href="/search?q=module%3APlugin">module:Plugin</a>)</td> </tr> <tr> <td><em>distribution:</em> (e.g. <a href="/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td> </tr> <tr> <td><em>author:</em> (e.g. <a href="/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td> </tr> <tr> <td><em>version:</em> (e.g. <a href="/search?q=version%3A1.00">version:1.00</a>)</td> </tr> </tbody> </table> </div> </div> <div class="modal-footer"></div> </div> </div> </div> </body> </html>