CINXE.COM
Class::Tiny - Minimalist class construction - metacpan.org
<!DOCTYPE html> <html lang="en-US"> <head> <title>Class::Tiny - Minimalist class construction - 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-Tiny - MetaCPAN" href="/dist/Class-Tiny/releases.rss" /> <link rel="canonical" href="https://metacpan.org/pod/Class::Tiny" /> <meta name="description" content="Minimalist class construction" /> <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::Tiny" /> <meta property="og:title" content="Class::Tiny" /> <meta property="og:description" content="Minimalist class construction" /> <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-Tiny was released."> <span class="relatize">04 Sep 2020 14:57:38 UTC</span> </div> </li> <li> Distribution: <a href="/dist/Class-Tiny">Class-Tiny</a> </li> <li> Module version: 1.008 </li> <li> <a data-keyboard-shortcut="g s" href="/dist/Class-Tiny/source/lib/Class/Tiny.pm">Source</a> (<a href="/dist/Class-Tiny/source/lib/Class/Tiny.pm?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g b" href="/dist/Class-Tiny/source/lib/Class">Browse</a> (<a href="/dist/Class-Tiny/source/lib/Class?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g c" href="/dist/Class-Tiny/changes">Changes</a> </li> <li> <a rel="noopener nofollow" class="nopopup" href="https://github.com/dagolden/Class-Tiny">Homepage</a> </li> <li> <a class="nopopup" href="/dist/Class-Tiny/contribute">How to Contribute</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/dagolden/Class-Tiny">Repository</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/dagolden/Class-Tiny/issues">Issues</a> (5) </li> <li> <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Class-Tiny+1.008" title="Matrix">Testers</a> <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/C/Class-Tiny.html?oncpan=1&distmat=1&version=1.008&grade=2" style="color: #090">7587</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/C/Class-Tiny.html?oncpan=1&distmat=1&version=1.008&grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/C/Class-Tiny.html?oncpan=1&distmat=1&version=1.008&grade=4">1</a>)</span> </li> <li> <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/DAGOLDEN/Class-Tiny-1.008">Kwalitee</a> </li> <li> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Class-Tiny 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: 2 </div> </li> <li> <a rel="noopener nofollow" href="http://cpancover.com/latest/Class-Tiny-1.008/index.html">84.36% Coverage </a> </li> <li> License: apache_2_0 </li> <li> Perl: v5.6.0 </li> <li class="nav-header">Activity</li> <li> <div class="activity-graph"> <img src="/dist/Class-Tiny/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/D/DA/DAGOLDEN/Class-Tiny-1.008.tar.gz"> Download (<span itemprop="fileSize">24.08KB</span>)</a> </li> <li> <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FDAGOLDEN%2FClass-Tiny-1.008%2Flib%2FClass%2FTiny.pm"> MetaCPAN Explorer </a> </li> <li> <a href="/dist/Class-Tiny/permissions"> Permissions </a> </li> <li> <a href="/dist/Class-Tiny/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-Tiny"> <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-Tiny"> <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/DAGOLDEN/Class-Tiny-1.008/view/lib/Class/Tiny.pm" >1.008 (DAGOLDEN on 2020-09-04)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.007-TRIAL/view/lib/Class/Tiny.pm" >1.007-TRIAL DEV (DAGOLDEN on 2020-09-02)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.006/view/lib/Class/Tiny.pm" >1.006 (DAGOLDEN on 2016-09-10)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.005-TRIAL/view/lib/Class/Tiny.pm" >1.005-TRIAL DEV (DAGOLDEN on 2016-09-06)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.004/view/lib/Class/Tiny.pm" >1.004 (DAGOLDEN on 2015-10-30)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.001/view/lib/Class/Tiny.pm" >1.001 (DAGOLDEN on 2015-01-31)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.000/view/lib/Class/Tiny.pm" >1.000 (DAGOLDEN on 2014-07-16)</option> <optgroup label="BackPAN">' <option value="/release/DAGOLDEN/Class-Tiny-1.003-TRIAL/view/lib/Class/Tiny.pm" >1.003-TRIAL DEV (DAGOLDEN on 2015-10-27)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.015/view/lib/Class/Tiny.pm" >0.015 (DAGOLDEN on 2014-07-14)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.014/view/lib/Class/Tiny.pm" >0.014 (DAGOLDEN on 2013-11-28)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.013/view/lib/Class/Tiny.pm" >0.013 (DAGOLDEN on 2013-11-26)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.012/view/lib/Class/Tiny.pm" >0.012 (DAGOLDEN on 2013-11-01)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.011/view/lib/Class/Tiny.pm" >0.011 (DAGOLDEN on 2013-09-25)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.010/view/lib/Class/Tiny.pm" >0.010 (DAGOLDEN on 2013-09-18)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.009/view/lib/Class/Tiny.pm" >0.009 (DAGOLDEN on 2013-09-17)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.008/view/lib/Class/Tiny.pm" >0.008 (DAGOLDEN on 2013-09-08)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.007/view/lib/Class/Tiny.pm" >0.007 (DAGOLDEN on 2013-09-07)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.006/view/lib/Class/Tiny.pm" >0.006 (DAGOLDEN on 2013-09-05)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.005/view/lib/Class/Tiny.pm" >0.005 (DAGOLDEN on 2013-08-28)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.004/view/lib/Class/Tiny.pm" >0.004 (DAGOLDEN on 2013-08-21)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.003/view/lib/Class/Tiny.pm" >0.003 (DAGOLDEN on 2013-08-19)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.002/view/lib/Class/Tiny.pm" >0.002 (DAGOLDEN on 2013-08-19)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.001/view/lib/Class/Tiny.pm" >0.001 (DAGOLDEN on 2013-08-16)</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/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-1.008/lib/Class/Tiny.pm" >1.008 (DAGOLDEN on 2020-09-04)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-1.007-TRIAL/lib/Class/Tiny.pm" >1.007-TRIAL DEV (DAGOLDEN on 2020-09-02)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-1.006/lib/Class/Tiny.pm" >1.006 (DAGOLDEN on 2016-09-10)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-1.005-TRIAL/lib/Class/Tiny.pm" >1.005-TRIAL DEV (DAGOLDEN on 2016-09-06)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-1.004/lib/Class/Tiny.pm" >1.004 (DAGOLDEN on 2015-10-30)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-1.001/lib/Class/Tiny.pm" >1.001 (DAGOLDEN on 2015-01-31)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-1.000/lib/Class/Tiny.pm" >1.000 (DAGOLDEN on 2014-07-16)</option> <optgroup label="BackPAN">' <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-1.003-TRIAL/lib/Class/Tiny.pm" >1.003-TRIAL DEV (DAGOLDEN on 2015-10-27)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.015/lib/Class/Tiny.pm" >0.015 (DAGOLDEN on 2014-07-14)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.014/lib/Class/Tiny.pm" >0.014 (DAGOLDEN on 2013-11-28)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.013/lib/Class/Tiny.pm" >0.013 (DAGOLDEN on 2013-11-26)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.012/lib/Class/Tiny.pm" >0.012 (DAGOLDEN on 2013-11-01)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.011/lib/Class/Tiny.pm" >0.011 (DAGOLDEN on 2013-09-25)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.010/lib/Class/Tiny.pm" >0.010 (DAGOLDEN on 2013-09-18)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.009/lib/Class/Tiny.pm" >0.009 (DAGOLDEN on 2013-09-17)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.008/lib/Class/Tiny.pm" >0.008 (DAGOLDEN on 2013-09-08)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.007/lib/Class/Tiny.pm" >0.007 (DAGOLDEN on 2013-09-07)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.006/lib/Class/Tiny.pm" >0.006 (DAGOLDEN on 2013-09-05)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.005/lib/Class/Tiny.pm" >0.005 (DAGOLDEN on 2013-08-28)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.004/lib/Class/Tiny.pm" >0.004 (DAGOLDEN on 2013-08-21)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.003/lib/Class/Tiny.pm" >0.003 (DAGOLDEN on 2013-08-19)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.002/lib/Class/Tiny.pm" >0.002 (DAGOLDEN on 2013-08-19)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.008/diff/DAGOLDEN/Class-Tiny-0.001/lib/Class/Tiny.pm" >0.001 (DAGOLDEN on 2013-08-16)</option> </optgroup> </select> </li> <li> <ul class="dependencies"> <li class="nav-header">Dependencies</li> <li><a href="/pod/Carp" title="Carp" class="ellipsis">Carp</a></li> <li><a href="/pod/strict" title="strict" class="ellipsis">strict</a></li> <li><a href="/pod/warnings" title="warnings" class="ellipsis">warnings</a></li> <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li> <li> <hr> </li> <li> <a href="/module/Class::Tiny/requires">Reverse dependencies</a> </li> <li> <a href="http://deps.cpantesters.org/?module=Class%3A%3ATiny">CPAN Testers List</a> </li> <li> <a href="https://cpandeps.grinnz.com/?dist=Class-Tiny">Dependency graph</a> </li> </ul> </li> <li class="nav-header">Permalinks</li> <li> <a href="/release/DAGOLDEN/Class-Tiny-1.008/view/lib/Class/Tiny.pm">This version</a> </li> <li> <a href="/pod/Class::Tiny">Latest version</a> </li> <li> <div class="plussers"> <div class="nav-header">++ed by:</div> <div> <a class="display-all" href="/author/NGLENN"><img src="https://www.gravatar.com/avatar/d760ed3250a704f6ae9e2c9b4d73cc1f?d=identicon&s=20" title="NGLENN" alt="NGLENN"></a> <a class="display-all" href="/author/DAGOLDEN"><img src="https://www.gravatar.com/avatar/bb755c989fcb9897f28a2c6e00df61e2?d=identicon&s=20" title="DAGOLDEN" alt="DAGOLDEN"></a> <a class="display-all" href="/author/DELON"><img src="https://www.gravatar.com/avatar/8a316157de5eaa39f351b1725c4641d0?d=identicon&s=20" title="DELON" alt="DELON"></a> <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/JASEI"><img src="https://www.gravatar.com/avatar/22e4dbbfcaa9209071b52f41cb36cea1?d=identicon&s=20" title="JASEI" alt="JASEI"></a> </div> <!-- Display counts of plussers--> <div> <a href="/dist/Class-Tiny/plussers">24 PAUSE users</a> </div> <div> 15 non-PAUSE users </div> </div> </li> <li> <div> <button class="contributors-show-button btn-link">and 6 contributors</button> <div id="metacpan_contributors" class="slide-out slide-out-hidden"> <div> <ul> <li class="contributor" data-cpan-author="ILMARI" data-contrib-email="ilmari@ilmari.org" > <a href="/author/ILMARI" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/a3059acdb28ce93c8b66a5f398b2cb39?d=identicon&s=20" /> Dagfinn Ilmari Mannsåker </a> </li> <li class="contributor" data-contrib-email="gelu@devnull.ro" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&s=20" /> Gelu Lupas </li> <li class="contributor" data-cpan-author="ETHER" data-contrib-email="ether@cpan.org" > <a href="/author/ETHER" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/bdc5cd06679e732e262f6c1b450a0237?d=identicon&s=20" /> Karen Etheridge </a> </li> <li class="contributor" data-cpan-author="MSTROUT" data-contrib-email="mstrout@cpan.org" > <a href="/author/MSTROUT" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/4e8e2db385219e064e6dea8fbd386434?d=identicon&s=20" /> Matt S Trout </a> </li> <li class="contributor" data-cpan-author="DOLMEN" data-contrib-email="dolmen@cpan.org" > <a href="/author/DOLMEN" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/70d9b050bfe39350c234d710fadfcd39?d=identicon&s=20" /> Olivier Mengué </a> </li> <li class="contributor" data-cpan-author="TOBYINK" data-contrib-email="tobyink@cpan.org" > <a href="/author/TOBYINK" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/f8faf2a422aecd1007b7d54c19ce7f39?d=identicon&s=20" /> Toby Inkster </a> </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/DAGOLDEN" class="author-name">David Golden</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/DAGOLDEN/Class-Tiny-1.008/view/lib/Class/Tiny.pm" >1.008 (DAGOLDEN on 2020-09-04)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.007-TRIAL/view/lib/Class/Tiny.pm" >1.007-TRIAL DEV (DAGOLDEN on 2020-09-02)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.006/view/lib/Class/Tiny.pm" >1.006 (DAGOLDEN on 2016-09-10)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.005-TRIAL/view/lib/Class/Tiny.pm" >1.005-TRIAL DEV (DAGOLDEN on 2016-09-06)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.004/view/lib/Class/Tiny.pm" >1.004 (DAGOLDEN on 2015-10-30)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.001/view/lib/Class/Tiny.pm" >1.001 (DAGOLDEN on 2015-01-31)</option> <option value="/release/DAGOLDEN/Class-Tiny-1.000/view/lib/Class/Tiny.pm" >1.000 (DAGOLDEN on 2014-07-16)</option> <optgroup label="BackPAN">' <option value="/release/DAGOLDEN/Class-Tiny-1.003-TRIAL/view/lib/Class/Tiny.pm" >1.003-TRIAL DEV (DAGOLDEN on 2015-10-27)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.015/view/lib/Class/Tiny.pm" >0.015 (DAGOLDEN on 2014-07-14)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.014/view/lib/Class/Tiny.pm" >0.014 (DAGOLDEN on 2013-11-28)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.013/view/lib/Class/Tiny.pm" >0.013 (DAGOLDEN on 2013-11-26)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.012/view/lib/Class/Tiny.pm" >0.012 (DAGOLDEN on 2013-11-01)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.011/view/lib/Class/Tiny.pm" >0.011 (DAGOLDEN on 2013-09-25)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.010/view/lib/Class/Tiny.pm" >0.010 (DAGOLDEN on 2013-09-18)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.009/view/lib/Class/Tiny.pm" >0.009 (DAGOLDEN on 2013-09-17)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.008/view/lib/Class/Tiny.pm" >0.008 (DAGOLDEN on 2013-09-08)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.007/view/lib/Class/Tiny.pm" >0.007 (DAGOLDEN on 2013-09-07)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.006/view/lib/Class/Tiny.pm" >0.006 (DAGOLDEN on 2013-09-05)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.005/view/lib/Class/Tiny.pm" >0.005 (DAGOLDEN on 2013-08-28)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.004/view/lib/Class/Tiny.pm" >0.004 (DAGOLDEN on 2013-08-21)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.003/view/lib/Class/Tiny.pm" >0.003 (DAGOLDEN on 2013-08-19)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.002/view/lib/Class/Tiny.pm" >0.002 (DAGOLDEN on 2013-08-19)</option> <option value="/release/DAGOLDEN/Class-Tiny-0.001/view/lib/Class/Tiny.pm" >0.001 (DAGOLDEN on 2013-08-16)</option> </optgroup> </select> <a data-keyboard-shortcut="g d" class="release-name" href="/dist/Class-Tiny">Class-Tiny-1.008</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 • 80 direct dependents • 4379 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-Tiny-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-Tiny-1.008"> <input type="hidden" name="author" value="DAGOLDEN"> <input type="hidden" name="distribution" value="Class-Tiny"> <button type="submit" class="favorite highlight"><span>39</span> ++</button> </form> </div> <div class="show-logged-out"> <button class="fav-not-logged-in favorite highlight"><span>39</span> ++</button> </div> / <span>Class::Tiny</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="#VERSION">VERSION</a></li> <li><a href="#SYNOPSIS">SYNOPSIS</a></li> <li><a href="#DESCRIPTION">DESCRIPTION</a></li> <li><a href="#USAGE">USAGE</a> <ul> <li><a href="#Defining-attributes">Defining attributes</a></li> <li><a href="#Class%3A%3ATiny%3A%3AObject-is-your-base-class">Class::Tiny::Object is your base class</a></li> <li><a href="#Object-construction">Object construction</a></li> <li><a href="#BUILD">BUILD</a></li> <li><a href="#DEMOLISH">DEMOLISH</a></li> <li><a href="#Introspection-and-internals">Introspection and internals</a></li> </ul> </li> <li><a href="#RATIONALE">RATIONALE</a> <ul> <li><a href="#Why-this-instead-of-Object%3A%3ATiny-or-Class%3A%3AAccessor-or-something-else%3F">Why this instead of Object::Tiny or Class::Accessor or something else?</a></li> <li><a href="#Why-this-instead-of-Moose-or-Moo%3F">Why this instead of Moose or Moo?</a></li> </ul> </li> <li><a href="#AUTHOR">AUTHOR</a></li> <li><a href="#CONTRIBUTORS">CONTRIBUTORS</a></li> <li><a href="#COPYRIGHT-AND-LICENSE">COPYRIGHT AND LICENSE</a></li> </ul></nav> <div class="pod anchors"> <h1 id="NAME">NAME</h1> <p>Class::Tiny - Minimalist class construction</p> <h1 id="VERSION">VERSION</h1> <p>version 1.008</p> <h1 id="SYNOPSIS">SYNOPSIS</h1> <p>In <i>Person.pm</i>:</p> <pre><code>package Person; use Class::Tiny qw( name ); 1;</code></pre> <p>In <i>Employee.pm</i>:</p> <pre><code>package Employee; use parent 'Person'; use Class::Tiny qw( ssn ), { timestamp => sub { time } # attribute with default }; 1;</code></pre> <p>In <i>example.pl</i>:</p> <pre><code>use Employee; my $obj = Employee->new( name => "Larry", ssn => "111-22-3333" ); # unknown attributes are ignored my $obj = Employee->new( name => "Larry", OS => "Linux" ); # $obj->{OS} does not exist</code></pre> <h1 id="DESCRIPTION">DESCRIPTION</h1> <p>This module offers a minimalist class construction kit in around 120 lines of code. Here is a list of features:</p> <ul> <li><p>defines attributes via import arguments</p> </li> <li><p>generates read-write accessors</p> </li> <li><p>supports lazy attribute defaults</p> </li> <li><p>supports custom accessors</p> </li> <li><p>superclass provides a standard <code>new</code> constructor</p> </li> <li><p><code>new</code> takes a hash reference or list of key/value pairs</p> </li> <li><p><code>new</code> supports providing <code>BUILDARGS</code> to customize constructor options</p> </li> <li><p><code>new</code> calls <code>BUILD</code> for each class from parent to child</p> </li> <li><p>superclass provides a <code>DESTROY</code> method</p> </li> <li><p><code>DESTROY</code> calls <code>DEMOLISH</code> for each class from child to parent</p> </li> </ul> <p>Multiple-inheritance is possible, with superclass order determined via <a href="/pod/mro#Functions">mro::get_linear_isa</a>.</p> <p>It uses no non-core modules for any recent Perl. On Perls older than v5.10 it requires <a href="/pod/MRO::Compat">MRO::Compat</a>. On Perls older than v5.14, it requires <a href="/pod/Devel::GlobalDestruction">Devel::GlobalDestruction</a>.</p> <h1 id="USAGE">USAGE</h1> <h2 id="Defining-attributes"><a id="Defining"></a>Defining attributes</h2> <p>Define attributes as a list of import arguments:</p> <pre><code>package Foo::Bar; use Class::Tiny qw( name id height weight );</code></pre> <p>For each attribute, a read-write accessor is created unless a subroutine of that name already exists:</p> <pre><code>$obj->name; # getter $obj->name( "John Doe" ); # setter</code></pre> <p>Attribute names must be valid subroutine identifiers or an exception will be thrown.</p> <p>You can specify lazy defaults by defining attributes with a hash reference. Keys define attribute names and values are constants or code references that will be evaluated when the attribute is first accessed if no value has been set. The object is passed as an argument to a code reference.</p> <pre><code>package Foo::WithDefaults; use Class::Tiny qw/name id/, { title => 'Peon', skills => sub { [] }, hire_date => sub { $_[0]->_build_hire_date }, };</code></pre> <p>When subclassing, if multiple accessors of the same name exist in different classes, any default (or lack of default) is determined by standard method resolution order.</p> <p>To make your own custom accessors, just pre-declare the method name before loading Class::Tiny:</p> <pre><code>package Foo::Bar; use subs 'id'; use Class::Tiny qw( name id ); sub id { ... }</code></pre> <p>Even if you pre-declare a method name, you must include it in the attribute list for Class::Tiny to register it as a valid attribute.</p> <p>If you set a default for a custom accessor, your accessor will need to retrieve the default and do something with it:</p> <pre><code>package Foo::Bar; use subs 'id'; use Class::Tiny qw( name ), { id => sub { int(rand(2*31)) } }; sub id { my $self = shift; if (@_) { return $self->{id} = shift; } elsif ( exists $self->{id} ) { return $self->{id}; } else { my $defaults = Class::Tiny->get_all_attribute_defaults_for( ref $self ); return $self->{id} = $defaults->{id}->(); } }</code></pre> <h2 id="Class::Tiny::Object-is-your-base-class"><a id="Class"></a>Class::Tiny::Object is your base class</h2> <p>If your class <b>does not</b> already inherit from some class, then Class::Tiny::Object will be added to your <code>@ISA</code> to provide <code>new</code> and <code>DESTROY</code>.</p> <p>If your class <b>does</b> inherit from something, then no additional inheritance is set up. If the parent subclasses Class::Tiny::Object, then all is well. If not, then you'll get accessors set up but no constructor or destructor. Don't do that unless you really have a special need for it.</p> <p>Define subclasses as normal. It's best to define them with <a href="/pod/base">base</a>, <a href="/pod/parent">parent</a> or <a href="/pod/superclass">superclass</a> before defining attributes with Class::Tiny so the <code>@ISA</code> array is already populated at compile-time:</p> <pre><code>package Foo::Bar::More; use parent 'Foo::Bar'; use Class::Tiny qw( shoe_size );</code></pre> <h2 id="Object-construction"><a id="Object"></a>Object construction</h2> <p>If your class inherits from Class::Tiny::Object (as it should if you followed the advice above), it provides the <code>new</code> constructor for you.</p> <p>Objects can be created with attributes given as a hash reference or as a list of key/value pairs:</p> <pre><code>$obj = Foo::Bar->new( name => "David" ); $obj = Foo::Bar->new( { name => "David" } );</code></pre> <p>If a reference is passed as a single argument, it must be able to be dereferenced as a hash or an exception is thrown.</p> <p>Unknown attributes in the constructor arguments will be ignored. Prior to version 1.000, unknown attributes were an error, but this made it harder for people to cleanly subclass Class::Tiny classes so this feature was removed.</p> <p>You can define a <code>BUILDARGS</code> method to change how arguments to new are handled. It will receive the constructor arguments as they were provided and must return a hash reference of key/value pairs (or else throw an exception).</p> <pre><code>sub BUILDARGS { my $class = shift; my $name = shift || "John Doe"; return { name => $name }; }; Foo::Bar->new( "David" ); Foo::Bar->new(); # "John Doe"</code></pre> <p>Unknown attributes returned from <code>BUILDARGS</code> will be ignored.</p> <h2 id="BUILD">BUILD</h2> <p>If your class or any superclass defines a <code>BUILD</code> method, it will be called by the constructor from the furthest parent class down to the child class after the object has been created.</p> <p>It is passed the constructor arguments as a hash reference. The return value is ignored. Use <code>BUILD</code> for validation, checking required attributes or setting default values that depend on other attributes.</p> <pre><code>sub BUILD { my ($self, $args) = @_; for my $req ( qw/name age/ ) { croak "$req attribute required" unless defined $self->$req; } croak "Age must be non-negative" if $self->age < 0; $self->msg( "Hello " . $self->name ); }</code></pre> <p>The argument reference is a copy, so deleting elements won't affect data in the original (but changes will be passed to other BUILD methods in <code>@ISA</code>).</p> <h2 id="DEMOLISH">DEMOLISH</h2> <p>Class::Tiny provides a <code>DESTROY</code> method. If your class or any superclass defines a <code>DEMOLISH</code> method, they will be called from the child class to the furthest parent class during object destruction. It is provided a single boolean argument indicating whether Perl is in global destruction. Return values are ignored. Errors are caught and rethrown.</p> <pre><code>sub DEMOLISH { my ($self, $global_destruct) = @_; $self->cleanup(); }</code></pre> <h2 id="Introspection-and-internals"><a id="Introspection"></a>Introspection and internals</h2> <p>You can retrieve an unsorted list of valid attributes known to Class::Tiny for a class and its superclasses with the <code>get_all_attributes_for</code> class method.</p> <pre><code>my @attrs = Class::Tiny->get_all_attributes_for("Employee"); # returns qw/name ssn timestamp/</code></pre> <p>Likewise, a hash reference of all valid attributes and default values (or code references) may be retrieved with the <code>get_all_attribute_defaults_for</code> class method. Any attributes without a default will be <code>undef</code>.</p> <pre><code>my $def = Class::Tiny->get_all_attribute_defaults_for("Employee"); # returns { # name => undef, # ssn => undef # timestamp => $coderef # }</code></pre> <p>The <code>import</code> method uses two class methods, <code>prepare_class</code> and <code>create_attributes</code> to set up the <code>@ISA</code> array and attributes. Anyone attempting to extend Class::Tiny itself should use these instead of mocking up a call to <code>import</code>.</p> <p>When the first object is created, linearized <code>@ISA</code>, the valid attribute list and various subroutine references are cached for speed. Ensure that all inheritance and methods are in place before creating objects. (You don't want to be changing that once you create objects anyway, right?)</p> <h1 id="RATIONALE">RATIONALE</h1> <h2 id="Why-this-instead-of-Object::Tiny-or-Class::Accessor-or-something-else?"><a id="Why"></a><a id="Why-this-instead-of-Object::Tiny-or-Class::Accessor-or-something-else"></a>Why this instead of Object::Tiny or Class::Accessor or something else?</h2> <p>I wanted something so simple that it could potentially be used by core Perl modules I help maintain (or hope to write), most of which either use <a href="/pod/Class::Struct">Class::Struct</a> or roll-their-own OO framework each time.</p> <p><a href="/pod/Object::Tiny">Object::Tiny</a> and <a href="/pod/Object::Tiny::RW">Object::Tiny::RW</a> were close to what I wanted, but lacking some features I deemed necessary, and their maintainers have an even more strict philosophy against feature creep than I have.</p> <p>I also considered <a href="/pod/Class::Accessor">Class::Accessor</a>, which has been around a long time and is heavily used, but it, too, lacked features I wanted and did things in ways I considered poor design.</p> <p>I looked for something else on CPAN, but after checking a dozen class creators I realized I could implement exactly what I wanted faster than I could search CPAN for something merely sufficient.</p> <p>In general, compared to most things on CPAN (other than Object::Tiny), Class::Tiny is smaller in implementation and simpler in API.</p> <p>Specifically, here is how Class::Tiny ("C::T") compares to Object::Tiny ("O::T") and Class::Accessor ("C::A"):</p> <pre><code>FEATURE C::T O::T C::A -------------------------------------------------------------- attributes defined via import yes yes no read/write accessors yes no yes lazy attribute defaults yes no no provides new yes yes yes provides DESTROY yes no no new takes either hashref or list yes no (list) no (hash) Moo(se)-like BUILD/DEMOLISH yes no no Moo(se)-like BUILDARGS yes no no no extraneous methods via @ISA yes yes no</code></pre> <h2 id="Why-this-instead-of-Moose-or-Moo?"><a id="Why1"></a><a id="Why-this-instead-of-Moose-or-Moo"></a>Why this instead of Moose or Moo?</h2> <p><a href="/pod/Moose">Moose</a> and <a href="/pod/Moo">Moo</a> are both excellent OO frameworks. Moose offers a powerful meta-object protocol (MOP), but is slow to start up and has about 30 non-core dependencies including XS modules. Moo is faster to start up and has about 10 pure Perl dependencies but provides no true MOP, relying instead on its ability to transparently upgrade Moo to Moose when Moose's full feature set is required.</p> <p>By contrast, Class::Tiny has no MOP and has <b>zero</b> non-core dependencies for Perls in the <a href="/pod/perlpolicy">support window</a>. It has far less code, less complexity and no learning curve. If you don't need or can't afford what Moo or Moose offer, this is intended to be a reasonable fallback.</p> <p>That said, Class::Tiny offers Moose-like conventions for things like <code>BUILD</code> and <code>DEMOLISH</code> for some minimal interoperability and an easier upgrade path.</p> <h1 id="AUTHOR">AUTHOR</h1> <p>David Golden <dagolden@cpan.org></p> <h1 id="CONTRIBUTORS">CONTRIBUTORS</h1> <ul> <li><p>Dagfinn Ilmari Mannsåker <ilmari@ilmari.org></p> </li> <li><p>David Golden <xdg@xdg.me></p> </li> <li><p>Gelu Lupas <gelu@devnull.ro></p> </li> <li><p>Karen Etheridge <ether@cpan.org></p> </li> <li><p>Matt S Trout <mstrout@cpan.org></p> </li> <li><p>Olivier Mengué <dolmen@cpan.org></p> </li> <li><p>Toby Inkster <tobyink@cpan.org></p> </li> </ul> <h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1> <p>This software is Copyright (c) 2013 by David Golden.</p> <p>This is free software, licensed under:</p> <pre><code>The Apache License, Version 2.0, January 2004</code></pre></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::Tiny, 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::Tiny</code></pre> <p><a href="/pod/CPAN">CPAN shell</a></p> <pre><code>perl -MCPAN -e shell install Class::Tiny</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>