CINXE.COM

Readonly - Facility for creating read-only scalars, arrays, hashes - metacpan.org

<!DOCTYPE html> <html lang="en-US"> <head> <title>Readonly - Facility for creating read-only scalars, arrays, hashes - 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 Readonly - MetaCPAN" href="/dist/Readonly/releases.rss" /> <link rel="canonical" href="https://metacpan.org/pod/Readonly" /> <meta name="description" content="Facility for creating read-only scalars, arrays, hashes" /> <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/Readonly" /> <meta property="og:title" content="Readonly" /> <meta property="og:description" content="Facility for creating read-only scalars, arrays, hashes" /> <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 Readonly was released."> <span class="relatize">10 Jun 2016 17:05:16 UTC</span> </div> </li> <li> Distribution: <a href="/dist/Readonly">Readonly</a> </li> <li> Module version: 2.05 </li> <li> <a data-keyboard-shortcut="g s" href="/dist/Readonly/source/lib/Readonly.pm">Source</a> (<a href="/dist/Readonly/source/lib/Readonly.pm?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g b" href="/dist/Readonly/source/lib">Browse</a> (<a href="/dist/Readonly/source/lib?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g c" href="/dist/Readonly/changes">Changes</a> </li> <li> <a rel="noopener nofollow" class="nopopup" href="https://github.com/sanko/readonly">Homepage</a> </li> <li> <a class="nopopup" href="/dist/Readonly/contribute">How to Contribute</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/sanko/readonly">Repository</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/sanko/readonly/issues">Issues</a> (21) </li> <li> <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Readonly+2.05" title="Matrix">Testers</a> <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Readonly.html?oncpan=1&amp;distmat=1&amp;version=2.05&amp;grade=2" style="color: #090">2463</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Readonly.html?oncpan=1&amp;distmat=1&amp;version=2.05&amp;grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Readonly.html?oncpan=1&amp;distmat=1&amp;version=2.05&amp;grade=4">1</a>)</span> </li> <li> <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/SANKO/Readonly-2.05">Kwalitee</a> </li> <li> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Readonly 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/Readonly-2.05/index.html">80.37% Coverage </a> </li> <li> License: artistic_2 </li> <li> Perl: v5.5.0 </li> <li class="nav-header">Activity</li> <li> <div class="activity-graph"> <img src="/dist/Readonly/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/S/SA/SANKO/Readonly-2.05.tar.gz"> Download (<span itemprop="fileSize">28.2KB</span>)</a> </li> <li> <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FSANKO%2FReadonly-2.05%2Flib%2FReadonly.pm"> MetaCPAN Explorer </a> </li> <li> <a href="/dist/Readonly/permissions"> Permissions </a> </li> <li> <a href="/dist/Readonly/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:Readonly"> <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="Readonly"> <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/SANKO/Readonly-2.05/view/lib/Readonly.pm" >2.05 (SANKO on 2016-06-10)</option> <option value="/release/SANKO/Readonly-2.04/view/lib/Readonly.pm" >2.04 (SANKO on 2016-05-07)</option> <option value="/release/SANKO/Readonly-2.03/view/lib/Readonly.pm" >2.03 (SANKO on 2016-05-06)</option> <option value="/release/SANKO/Readonly-2.02/view/lib/Readonly.pm" >2.02 (SANKO on 2016-05-06)</option> <option value="/release/SANKO/Readonly-2.01/view/lib/Readonly.pm" >2.01 (SANKO on 2016-02-24)</option> <option value="/release/SANKO/Readonly-2.00/view/lib/Readonly.pm" >2.00 (SANKO on 2014-07-02)</option> <option value="/release/SANKO/Readonly-1.61/view/lib/Readonly.pm" >1.61 (SANKO on 2014-06-28)</option> <option value="/release/ROODE/Readonly-1.03/view/lib/Readonly.pm" >1.03 (ROODE on 2004-04-21)</option> <option value="/release/ROODE/Readonly-1.02/view/lib/Readonly.pm" >1.02 (ROODE on 2003-05-16)</option> <option value="/release/ROODE/Readonly-1.01/view/lib/Readonly.pm" >1.01 (ROODE on 2003-02-14)</option> <option value="/release/ROODE/Readonly-1.00/view/lib/Readonly.pm" >1.00 (ROODE on 2003-01-08)</option> <option value="/release/ROODE/Readonly-0.07/view/lib/Readonly.pm" >0.07 (ROODE on 2002-06-27)</option> <option value="/release/ROODE/Readonly-0.06/view/lib/Readonly.pm" >0.06 (ROODE on 2002-06-18)</option> <option value="/release/ROODE/Readonly-0.05a/view/lib/Readonly.pm" >0.05a (ROODE on 2002-03-15)</option> <optgroup label="BackPAN">' <option value="/release/SANKO/Readonly-1.60/view/lib/Readonly.pm" >1.60 (SANKO on 2014-06-27)</option> <option value="/release/SANKO/Readonly-v1.500.0/view/lib/Readonly.pm" >v1.500.0 (SANKO on 2014-06-25)</option> <option value="/release/SANKO/Readonly-1.005_000/view/lib/Readonly.pm" >1.005_000 DEV (SANKO on 2014-06-24)</option> <option value="/release/SANKO/Readonly-v1.5.0/view/lib/Readonly.pm" >v1.5.0 (SANKO on 2014-06-24)</option> <option value="/release/SANKO/Readonly-1.04/view/lib/Readonly.pm" >1.04 (SANKO on 2013-11-26)</option> <option value="/release/SANKO/Readonly-v1.04.0/view/lib/Readonly.pm" >v1.04.0 (SANKO on 2013-11-26)</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/SANKO/Readonly-2.05/diff/SANKO/Readonly-2.05/lib/Readonly.pm" >2.05 (SANKO on 2016-06-10)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-2.04/lib/Readonly.pm" >2.04 (SANKO on 2016-05-07)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-2.03/lib/Readonly.pm" >2.03 (SANKO on 2016-05-06)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-2.02/lib/Readonly.pm" >2.02 (SANKO on 2016-05-06)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-2.01/lib/Readonly.pm" >2.01 (SANKO on 2016-02-24)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-2.00/lib/Readonly.pm" >2.00 (SANKO on 2014-07-02)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-1.61/lib/Readonly.pm" >1.61 (SANKO on 2014-06-28)</option> <option value="/release/SANKO/Readonly-2.05/diff/ROODE/Readonly-1.03/lib/Readonly.pm" >1.03 (ROODE on 2004-04-21)</option> <option value="/release/SANKO/Readonly-2.05/diff/ROODE/Readonly-1.02/lib/Readonly.pm" >1.02 (ROODE on 2003-05-16)</option> <option value="/release/SANKO/Readonly-2.05/diff/ROODE/Readonly-1.01/lib/Readonly.pm" >1.01 (ROODE on 2003-02-14)</option> <option value="/release/SANKO/Readonly-2.05/diff/ROODE/Readonly-1.00/lib/Readonly.pm" >1.00 (ROODE on 2003-01-08)</option> <option value="/release/SANKO/Readonly-2.05/diff/ROODE/Readonly-0.07/lib/Readonly.pm" >0.07 (ROODE on 2002-06-27)</option> <option value="/release/SANKO/Readonly-2.05/diff/ROODE/Readonly-0.06/lib/Readonly.pm" >0.06 (ROODE on 2002-06-18)</option> <option value="/release/SANKO/Readonly-2.05/diff/ROODE/Readonly-0.05a/lib/Readonly.pm" >0.05a (ROODE on 2002-03-15)</option> <optgroup label="BackPAN">' <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-1.60/lib/Readonly.pm" >1.60 (SANKO on 2014-06-27)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-v1.500.0/lib/Readonly.pm" >v1.500.0 (SANKO on 2014-06-25)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-1.005_000/lib/Readonly.pm" >1.005_000 DEV (SANKO on 2014-06-24)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-v1.5.0/lib/Readonly.pm" >v1.5.0 (SANKO on 2014-06-24)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-1.04/lib/Readonly.pm" >1.04 (SANKO on 2013-11-26)</option> <option value="/release/SANKO/Readonly-2.05/diff/SANKO/Readonly-v1.04.0/lib/Readonly.pm" >v1.04.0 (SANKO on 2013-11-26)</option> </optgroup> </select> </li> <li> <ul class="dependencies"> <li class="nav-header">Dependencies</li> <li><i>none</i></li> <li> <hr> </li> <li> <a href="/module/Readonly/requires">Reverse dependencies</a> </li> <li> <a href="http://deps.cpantesters.org/?module=Readonly">CPAN Testers List</a> </li> <li> <a href="https://cpandeps.grinnz.com/?dist=Readonly">Dependency graph</a> </li> </ul> </li> <li class="nav-header">Permalinks</li> <li> <a href="/release/SANKO/Readonly-2.05/view/lib/Readonly.pm">This version</a> </li> <li> <a href="/pod/Readonly">Latest version</a> </li> <li> <div class="plussers"> <div class="nav-header">++ed by:</div> <div> <a class="display-all" href="/author/XYF"><img src="https://www.gravatar.com/avatar/468b93184448908572ef5dc5c0924e76?d=identicon&amp;s=20" title="XYF" alt="XYF"></a> <a class="display-all" href="/author/BIFFEN"><img src="https://www.gravatar.com/avatar/ceeeed15488c70dd4fd2597cec3d0035?d=identicon&amp;s=20" title="BIFFEN" alt="BIFFEN"></a> <a class="display-all" href="/author/KES"><img src="https://www.gravatar.com/avatar/e8530f00b43b4f6a056f8ad4ee52ea47?d=identicon&amp;s=20" title="KES" alt="KES"></a> <a class="display-all" href="/author/PINGAN"><img src="https://www.gravatar.com/avatar/a02222e5e0e4fd24d52fc29a08ac6bcb?d=identicon&amp;s=20" title="PINGAN" alt="PINGAN"></a> <a class="display-all" href="/author/PERLBOY"><img src="https://www.gravatar.com/avatar/8553a87a00c8d2efcd77fb16e6eb73c9?d=identicon&amp;s=20" title="PERLBOY" alt="PERLBOY"></a> </div> <!-- Display counts of plussers--> <div> <a href="/dist/Readonly/plussers">7 PAUSE users</a> </div> <div> 15 non-PAUSE users </div> </div> </li> <li> <div> <button class="contributors-show-button btn-link">and 5 contributors</button> <div id="metacpan_contributors" class="slide-out slide-out-hidden"> <div> <ul> <li class="contributor" data-contrib-email="dsteinbrunner@pobox.com" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" /> David Steinbrunner </li> <li class="contributor" data-contrib-email="ivanchenko.michael.work@gmail.com" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" /> Michael Ivanchenko </li> <li class="contributor" data-contrib-email="pm@capmon.dk" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" /> Peter Valdemar Mørch </li> <li class="contributor" data-contrib-email="ronaldxs@software-path.com" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" /> Ronald Schmidt </li> <li class="contributor" data-contrib-email="viacheslav.t@gmail.com" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" /> vti </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/SANKO" class="author-name">Sanko Robinson</a> </span> <span>&nbsp;/&nbsp;</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/SANKO/Readonly-2.05/view/lib/Readonly.pm" >2.05 (SANKO on 2016-06-10)</option> <option value="/release/SANKO/Readonly-2.04/view/lib/Readonly.pm" >2.04 (SANKO on 2016-05-07)</option> <option value="/release/SANKO/Readonly-2.03/view/lib/Readonly.pm" >2.03 (SANKO on 2016-05-06)</option> <option value="/release/SANKO/Readonly-2.02/view/lib/Readonly.pm" >2.02 (SANKO on 2016-05-06)</option> <option value="/release/SANKO/Readonly-2.01/view/lib/Readonly.pm" >2.01 (SANKO on 2016-02-24)</option> <option value="/release/SANKO/Readonly-2.00/view/lib/Readonly.pm" >2.00 (SANKO on 2014-07-02)</option> <option value="/release/SANKO/Readonly-1.61/view/lib/Readonly.pm" >1.61 (SANKO on 2014-06-28)</option> <option value="/release/ROODE/Readonly-1.03/view/lib/Readonly.pm" >1.03 (ROODE on 2004-04-21)</option> <option value="/release/ROODE/Readonly-1.02/view/lib/Readonly.pm" >1.02 (ROODE on 2003-05-16)</option> <option value="/release/ROODE/Readonly-1.01/view/lib/Readonly.pm" >1.01 (ROODE on 2003-02-14)</option> <option value="/release/ROODE/Readonly-1.00/view/lib/Readonly.pm" >1.00 (ROODE on 2003-01-08)</option> <option value="/release/ROODE/Readonly-0.07/view/lib/Readonly.pm" >0.07 (ROODE on 2002-06-27)</option> <option value="/release/ROODE/Readonly-0.06/view/lib/Readonly.pm" >0.06 (ROODE on 2002-06-18)</option> <option value="/release/ROODE/Readonly-0.05a/view/lib/Readonly.pm" >0.05a (ROODE on 2002-03-15)</option> <optgroup label="BackPAN">' <option value="/release/SANKO/Readonly-1.60/view/lib/Readonly.pm" >1.60 (SANKO on 2014-06-27)</option> <option value="/release/SANKO/Readonly-v1.500.0/view/lib/Readonly.pm" >v1.500.0 (SANKO on 2014-06-25)</option> <option value="/release/SANKO/Readonly-1.005_000/view/lib/Readonly.pm" >1.005_000 DEV (SANKO on 2014-06-24)</option> <option value="/release/SANKO/Readonly-v1.5.0/view/lib/Readonly.pm" >v1.5.0 (SANKO on 2014-06-24)</option> <option value="/release/SANKO/Readonly-1.04/view/lib/Readonly.pm" >1.04 (SANKO on 2013-11-26)</option> <option value="/release/SANKO/Readonly-v1.04.0/view/lib/Readonly.pm" >v1.04.0 (SANKO on 2013-11-26)</option> </optgroup> </select> <a data-keyboard-shortcut="g d" class="release-name" href="/dist/Readonly">Readonly-2.05</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 &#10; • 507 direct dependents &#10; • 2808 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="Readonly-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="Readonly-2.05"> <input type="hidden" name="author" value="SANKO"> <input type="hidden" name="distribution" value="Readonly"> <button type="submit" class="favorite highlight"><span>22</span> ++</button> </form> </div> <div class="show-logged-out"> <button class="fav-not-logged-in favorite highlight"><span>22</span> ++</button> </div> / <span>Readonly</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></li> <li><a href="#Variable-Depth">Variable Depth</a></li> <li><a href="#"></a></li> <li><a href="#The-Past">The Past</a> <ul> <li><a href="#Comparison-with-%22use-constant%22">Comparison with &quot;use constant&quot;</a></li> </ul> </li> <li><a href="#Comparison-with-typeglob-constants">Comparison with typeglob constants</a> <ul> <li><a href="#Pros">Pros</a></li> <li><a href="#Cons">Cons</a></li> </ul> </li> <li><a href="#Functions">Functions</a></li> <li><a href="#Cloning">Cloning</a></li> <li><a href="#Examples">Examples</a> <ul> <li><a href="#Scalars">Scalars</a></li> <li><a href="#Arrays%2FLists">Arrays/Lists</a></li> <li><a href="#Hashes">Hashes</a></li> </ul> </li> <li><a href="#Exports">Exports</a></li> <li><a href="#Internals">Internals</a></li> <li><a href="#Requirements">Requirements</a></li> <li><a href="#Bug-Reports">Bug Reports</a></li> <li><a href="#Acknowledgements">Acknowledgements</a></li> <li><a href="#Author">Author</a></li> <li><a href="#License-and-Legal">License and Legal</a></li> </ul></nav> <div class="pod anchors"> <h1 id="NAME">NAME</h1> <p>Readonly - Facility for creating read-only scalars, arrays, hashes</p> <h1 id="Synopsis">Synopsis</h1> <pre><code>use Readonly; # Deep Read-only scalar Readonly::Scalar $sca =&gt; $initial_value; Readonly::Scalar my $sca =&gt; $initial_value; # Deep Read-only array Readonly::Array @arr =&gt; @values; Readonly::Array my @arr =&gt; @values; # Deep Read-only hash Readonly::Hash %has =&gt; (key =&gt; value, key =&gt; value, ...); Readonly::Hash my %has =&gt; (key =&gt; value, key =&gt; value, ...); # or: Readonly::Hash %has =&gt; {key =&gt; value, key =&gt; value, ...}; # You can use the read-only variables like any regular variables: print $sca; $something = $sca + $arr[2]; next if $has{$some_key}; # But if you try to modify a value, your program will die: $sca = 7; push @arr, &#39;seven&#39;; delete $has{key}; # The error message is &quot;Modification of a read-only value attempted&quot; # Alternate form (Perl 5.8 and later) Readonly $sca =&gt; $initial_value; Readonly my $sca =&gt; $initial_value; Readonly @arr =&gt; @values; Readonly my @arr =&gt; @values; Readonly %has =&gt; (key =&gt; value, key =&gt; value, ...); Readonly my %has =&gt; (key =&gt; value, key =&gt; value, ...); Readonly my $sca; # Implicit undef, readonly value # Alternate form (for Perls earlier than v5.8) Readonly \$sca =&gt; $initial_value; Readonly \my $sca =&gt; $initial_value; Readonly \@arr =&gt; @values; Readonly \my @arr =&gt; @values; Readonly \%has =&gt; (key =&gt; value, key =&gt; value, ...); Readonly \my %has =&gt; (key =&gt; value, key =&gt; value, ...);</code></pre> <h1 id="Description">Description</h1> <p>This is a facility for creating non-modifiable variables. This is useful for configuration files, headers, etc. It can also be useful as a development and debugging tool for catching updates to variables that should not be changed.</p> <h1 id="Variable-Depth"><a id="Variable"></a>Variable Depth</h1> <p>Readonly has the ability to create both deep and shallow readonly variables.</p> <p>If you pass a <code>$ref</code>, an <code>@array</code> or a <code>%hash</code> to corresponding functions <code>::Scalar()</code>, <code>::Array()</code> and <code>::Hash()</code>, then those functions recurse over the data structure, marking everything as readonly. The entire structure is then non-modifiable. This is normally what you want.</p> <p>If you want only the top level to be readonly, use the alternate (and poorly named) <code>::Scalar1()</code>, <code>::Array1()</code>, and <code>::Hash1()</code> functions.</p> <p>Plain <code>Readonly()</code> creates what the original author calls a &quot;shallow&quot; readonly variable, which is great if you don&#39;t plan to use it on anything but only one dimensional scalar values.</p> <p><code>Readonly::Scalar()</code> makes the variable &#39;deeply&#39; readonly, so the following snippet kills over as you expect:</p> <pre><code>use Readonly; Readonly::Scalar my $ref =&gt; { 1 =&gt; &#39;a&#39; }; $ref-&gt;{1} = &#39;b&#39;; $ref-&gt;{2} = &#39;b&#39;;</code></pre> <p>While the following snippet does <b>not</b> make your structure &#39;deeply&#39; readonly:</p> <pre><code>use Readonly; Readonly my $ref =&gt; { 1 =&gt; &#39;a&#39; }; $ref-&gt;{1} = &#39;b&#39;; $ref-&gt;{2} = &#39;b&#39;;</code></pre> <h1 id=""></h1> <h1 id="The-Past"><a id="The"></a>The Past</h1> <p>The following sections are updated versions of the previous authors documentation.</p> <h2 id="Comparison-with-&quot;use-constant&quot;"><a id="Comparison"></a><a id="Comparison-with-use-constant"></a>Comparison with &quot;use constant&quot;</h2> <p>Perl provides a facility for creating constant values, via the <a href="/pod/constant">constant</a> pragma. There are several problems with this pragma.</p> <ul> <li><p>The constants created have no leading sigils.</p> </li> <li><p>These constants cannot be interpolated into strings.</p> </li> <li><p>Syntax can get dicey sometimes. For example:</p> <pre><code>use constant CARRAY =&gt; (2, 3, 5, 7, 11, 13); $a_prime = CARRAY[2]; # wrong! $a_prime = (CARRAY)[2]; # right -- MUST use parentheses</code></pre> </li> <li><p>You have to be very careful in places where barewords are allowed.</p> <p>For example:</p> <pre><code>use constant SOME_KEY =&gt; &#39;key&#39;; %hash = (key =&gt; &#39;value&#39;, other_key =&gt; &#39;other_value&#39;); $some_value = $hash{SOME_KEY}; # wrong! $some_value = $hash{+SOME_KEY}; # right</code></pre> <p>(who thinks to use a unary plus when using a hash to scalarize the key?)</p> </li> <li><p><code>use constant</code> works for scalars and arrays, not hashes.</p> </li> <li><p>These constants are global to the package in which they&#39;re declared; cannot be lexically scoped.</p> </li> <li><p>Works only at compile time.</p> </li> <li><p>Can be overridden:</p> <pre><code>use constant PI =&gt; 3.14159; ... use constant PI =&gt; 2.71828;</code></pre> <p>(this does generate a warning, however, if you have warnings enabled).</p> </li> <li><p>It is very difficult to make and use deep structures (complex data structures) with <code>use constant</code>.</p> </li> </ul> <h1 id="Comparison-with-typeglob-constants"><a id="Comparison1"></a>Comparison with typeglob constants</h1> <p>Another popular way to create read-only scalars is to modify the symbol table entry for the variable by using a typeglob:</p> <pre><code>*a = \&#39;value&#39;;</code></pre> <p>This works fine, but it only works for global variables (&quot;my&quot; variables have no symbol table entry). Also, the following similar constructs do <b>not</b> work:</p> <pre><code>*a = [1, 2, 3]; # Does NOT create a read-only array *a = { a =&gt; &#39;A&#39;}; # Does NOT create a read-only hash</code></pre> <h2 id="Pros">Pros</h2> <p>Readonly.pm, on the other hand, will work with global variables and with lexical (&quot;my&quot;) variables. It will create scalars, arrays, or hashes, all of which look and work like normal, read-write Perl variables. You can use them in scalar context, in list context; you can take references to them, pass them to functions, anything.</p> <p>Readonly.pm also works well with complex data structures, allowing you to tag the whole structure as nonmodifiable, or just the top level.</p> <p>Also, Readonly variables may not be reassigned. The following code will die:</p> <pre><code>Readonly::Scalar $pi =&gt; 3.14159; ... Readonly::Scalar $pi =&gt; 2.71828;</code></pre> <h2 id="Cons">Cons</h2> <p>Readonly.pm used to impose a performance penalty. It was pretty slow. How slow? Run the <code>eg/benchmark.pl</code> script that comes with Readonly. On my test system, &quot;use constant&quot; (const), typeglob constants (tglob), regular read/write Perl variables (normal/literal), and the new Readonly (ro/ro_simple) are all about the same speed, the old, tie based Readonly.pm constants were about 1/22 the speed.</p> <p>However, there is relief. There is a companion module available, Readonly::XS. You won&#39;t need this if you&#39;re using Perl 5.8.x or higher.</p> <p>I repeat, you do not need Readonly::XS if your environment has perl 5.8.x or higher. Please see section entitled <a href="#Internals">Internals</a> for more.</p> <h1 id="Functions">Functions</h1> <dl> <dt id="Readonly::Scalar-$var-=&gt;-$value;"><a id="Readonly"></a><a id="Readonly::Scalar-var-value"></a>Readonly::Scalar $var =&gt; $value;</dt> <dd> <p>Creates a nonmodifiable scalar, <code>$var</code>, and assigns a value of <code>$value</code> to it. Thereafter, its value may not be changed. Any attempt to modify the value will cause your program to die.</p> <p>A value <i>must</i> be supplied. If you want the variable to have <code>undef</code> as its value, you must specify <code>undef</code>.</p> <p>If <code>$value</code> is a reference to a scalar, array, or hash, then this function will mark the scalar, array, or hash it points to as being Readonly as well, and it will recursively traverse the structure, marking the whole thing as Readonly. Usually, this is what you want. However, if you want only the <code>$value</code> marked as Readonly, use <code>Scalar1</code>.</p> <p>If $var is already a Readonly variable, the program will die with an error about reassigning Readonly variables.</p> </dd> <dt id="Readonly::Array-@arr-=&gt;-(value,-value,-...);"><a id="Readonly1"></a><a id="Readonly::Array-arr-value-value"></a>Readonly::Array @arr =&gt; (value, value, ...);</dt> <dd> <p>Creates a nonmodifiable array, <code>@arr</code>, and assigns the specified list of values to it. Thereafter, none of its values may be changed; the array may not be lengthened or shortened or spliced. Any attempt to do so will cause your program to die.</p> <p>If any of the values passed is a reference to a scalar, array, or hash, then this function will mark the scalar, array, or hash it points to as being Readonly as well, and it will recursively traverse the structure, marking the whole thing as Readonly. Usually, this is what you want. However, if you want only the hash <code>%@arr</code> itself marked as Readonly, use <code>Array1</code>.</p> <p>If <code>@arr</code> is already a Readonly variable, the program will die with an error about reassigning Readonly variables.</p> </dd> <dt id="Readonly::Hash-%h-=&gt;-(key-=&gt;-value,-key-=&gt;-value,-...);"><a id="Readonly2"></a><a id="Readonly::Hash-h-key-value-key-value"></a>Readonly::Hash %h =&gt; (key =&gt; value, key =&gt; value, ...);</dt> <dd> </dd> <dt id="Readonly::Hash-%h-=&gt;-{key-=&gt;-value,-key-=&gt;-value,-...};"><a id="Readonly3"></a><a id="Readonly::Hash-h-key-value-key-value1"></a>Readonly::Hash %h =&gt; {key =&gt; value, key =&gt; value, ...};</dt> <dd> <p>Creates a nonmodifiable hash, <code>%h</code>, and assigns the specified keys and values to it. Thereafter, its keys or values may not be changed. Any attempt to do so will cause your program to die.</p> <p>A list of keys and values may be specified (with parentheses in the synopsis above), or a hash reference may be specified (curly braces in the synopsis above). If a list is specified, it must have an even number of elements, or the function will die.</p> <p>If any of the values is a reference to a scalar, array, or hash, then this function will mark the scalar, array, or hash it points to as being Readonly as well, and it will recursively traverse the structure, marking the whole thing as Readonly. Usually, this is what you want. However, if you want only the hash <code>%h</code> itself marked as Readonly, use <code>Hash1</code>.</p> <p>If <code>%h</code> is already a Readonly variable, the program will die with an error about reassigning Readonly variables.</p> </dd> <dt id="Readonly-$var-=&gt;-$value;"><a id="Readonly4"></a><a id="Readonly-var-value"></a>Readonly $var =&gt; $value;</dt> <dd> </dd> <dt id="Readonly-@arr-=&gt;-(value,-value,-...);"><a id="Readonly5"></a><a id="Readonly-arr-value-value"></a>Readonly @arr =&gt; (value, value, ...);</dt> <dd> </dd> <dt id="Readonly-%h-=&gt;-(key-=&gt;-value,-...);"><a id="Readonly6"></a><a id="Readonly-h-key-value"></a>Readonly %h =&gt; (key =&gt; value, ...);</dt> <dd> </dd> <dt id="Readonly-%h-=&gt;-{key-=&gt;-value,-...};"><a id="Readonly7"></a><a id="Readonly-h-key-value1"></a>Readonly %h =&gt; {key =&gt; value, ...};</dt> <dd> </dd> <dt id="Readonly-$var;"><a id="Readonly8"></a><a id="Readonly-var"></a>Readonly $var;</dt> <dd> <p>The <code>Readonly</code> function is an alternate to the <code>Scalar</code>, <code>Array</code>, and <code>Hash</code> functions. It has the advantage (if you consider it an advantage) of being one function. That may make your program look neater, if you&#39;re initializing a whole bunch of constants at once. You may or may not prefer this uniform style.</p> <p>It has the disadvantage of having a slightly different syntax for versions of Perl prior to 5.8. For earlier versions, you must supply a backslash, because it requires a reference as the first parameter.</p> <pre><code>Readonly \$var =&gt; $value; Readonly \@arr =&gt; (value, value, ...); Readonly \%h =&gt; (key =&gt; value, ...); Readonly \%h =&gt; {key =&gt; value, ...};</code></pre> <p>You may or may not consider this ugly.</p> <p>Note that you can create implicit undefined variables with this function like so <code>Readonly my $var;</code> while a verbose undefined value must be passed to the standard <code>Scalar</code>, <code>Array</code>, and <code>Hash</code> functions.</p> </dd> <dt id="Readonly::Scalar1-$var-=&gt;-$value;"><a id="Readonly9"></a><a id="Readonly::Scalar1-var-value"></a>Readonly::Scalar1 $var =&gt; $value;</dt> <dd> </dd> <dt id="Readonly::Array1-@arr-=&gt;-(value,-value,-...);"><a id="Readonly10"></a><a id="Readonly::Array1-arr-value-value"></a>Readonly::Array1 @arr =&gt; (value, value, ...);</dt> <dd> </dd> <dt id="Readonly::Hash1-%h-=&gt;-(key-=&gt;-value,-key-=&gt;-value,-...);"><a id="Readonly11"></a><a id="Readonly::Hash1-h-key-value-key-value"></a>Readonly::Hash1 %h =&gt; (key =&gt; value, key =&gt; value, ...);</dt> <dd> </dd> <dt id="Readonly::Hash1-%h-=&gt;-{key-=&gt;-value,-key-=&gt;-value,-...};"><a id="Readonly12"></a><a id="Readonly::Hash1-h-key-value-key-value1"></a>Readonly::Hash1 %h =&gt; {key =&gt; value, key =&gt; value, ...};</dt> <dd> <p>These alternate functions create shallow Readonly variables, instead of deep ones. For example:</p> <pre><code>Readonly::Array1 @shal =&gt; (1, 2, {perl=&gt;&#39;Rules&#39;, java=&gt;&#39;Bites&#39;}, 4, 5); Readonly::Array @deep =&gt; (1, 2, {perl=&gt;&#39;Rules&#39;, java=&gt;&#39;Bites&#39;}, 4, 5); $shal[1] = 7; # error $shal[2]{APL}=&#39;Weird&#39;; # Allowed! since the hash isn&#39;t Readonly $deep[1] = 7; # error $deep[2]{APL}=&#39;Weird&#39;; # error, since the hash is Readonly</code></pre> </dd> </dl> <h1 id="Cloning">Cloning</h1> <p>When cloning using <a href="/pod/Storable">Storable</a> or <a href="/pod/Clone">Clone</a> you will notice that the value stays readonly, which is correct. If you want to clone the value without copying the readonly flag, use the <code>Clone</code> function:</p> <pre><code>Readonly::Scalar my $scalar =&gt; {qw[this that]}; # $scalar-&gt;{&#39;eh&#39;} = &#39;foo&#39;; # Modification of a read-only value attempted my $scalar_clone = Readonly::Clone $scalar; $scalar_clone-&gt;{&#39;eh&#39;} = &#39;foo&#39;; # $scalar_clone is now {this =&gt; &#39;that&#39;, eh =&gt; &#39;foo&#39;};</code></pre> <p>The new variable (<code>$scalar_clone</code>) is a mutable clone of the original <code>$scalar</code>.</p> <h1 id="Examples">Examples</h1> <p>These are a few very simple examples:</p> <h2 id="Scalars">Scalars</h2> <p>A plain old read-only value</p> <pre><code>Readonly::Scalar $a =&gt; &quot;A string value&quot;;</code></pre> <p>The value need not be a compile-time constant:</p> <pre><code>Readonly::Scalar $a =&gt; $computed_value;</code></pre> <h2 id="Arrays/Lists"><a id="Arrays"></a><a id="Arrays-Lists"></a>Arrays/Lists</h2> <p>A read-only array:</p> <pre><code>Readonly::Array @a =&gt; (1, 2, 3, 4);</code></pre> <p>The parentheses are optional:</p> <pre><code>Readonly::Array @a =&gt; 1, 2, 3, 4;</code></pre> <p>You can use Perl&#39;s built-in array quoting syntax:</p> <pre><code>Readonly::Array @a =&gt; qw/1 2 3 4/;</code></pre> <p>You can initialize a read-only array from a variable one:</p> <pre><code>Readonly::Array @a =&gt; @computed_values;</code></pre> <p>A read-only array can be empty, too:</p> <pre><code>Readonly::Array @a =&gt; (); Readonly::Array @a; # equivalent</code></pre> <h2 id="Hashes">Hashes</h2> <p>Typical usage:</p> <pre><code>Readonly::Hash %a =&gt; (key1 =&gt; &#39;value1&#39;, key2 =&gt; &#39;value2&#39;);</code></pre> <p>A read-only hash can be initialized from a variable one:</p> <pre><code>Readonly::Hash %a =&gt; %computed_values;</code></pre> <p>A read-only hash can be empty:</p> <pre><code>Readonly::Hash %a =&gt; (); Readonly::Hash %a; # equivalent</code></pre> <p>If you pass an odd number of values, the program will die:</p> <pre><code>Readonly::Hash %a =&gt; (key1 =&gt; &#39;value1&#39;, &quot;value2&quot;); # This dies with &quot;May not store an odd number of values in a hash&quot;</code></pre> <h1 id="Exports">Exports</h1> <p>Historically, this module exports the <code>Readonly</code> symbol into the calling program&#39;s namespace by default. The following symbols are also available for import into your program, if you like: <code>Scalar</code>, <code>Scalar1</code>, <code>Array</code>, <code>Array1</code>, <code>Hash</code>, and <code>Hash1</code>.</p> <h1 id="Internals">Internals</h1> <p>Some people simply do not understand the relationship between this module and Readonly::XS so I&#39;m adding this section. Odds are, they still won&#39;t understand but I like to write so...</p> <p>In the past, Readonly&#39;s &quot;magic&quot; was performed by <code>tie()</code>-ing variables to the <code>Readonly::Scalar</code>, <code>Readonly::Array</code>, and <code>Readonly::Hash</code> packages (not to be confused with the functions of the same names) and acting on <code>WRITE</code>, <code>READ</code>, et. al. While this worked well, it was slow. Very slow. Like 20-30 times slower than accessing variables directly or using one of the other const-related modules that have cropped up since Readonly was released in 2003.</p> <p>To &#39;fix&#39; this, Readonly::XS was written. If installed, Readonly::XS used the internal methods <code>SvREADONLY</code> and <code>SvREADONLY_on</code> to lock simple scalars. On the surface, everything was peachy but things weren&#39;t the same behind the scenes. In edge cases, code performed very differently if Readonly::XS was installed and because it wasn&#39;t a required dependency in most code, it made downstream bugs very hard to track.</p> <p>In the years since Readonly::XS was released, the then private internal methods have been exposed and can be used in pure perl. Similar modules were written to take advantage of this and a patch to Readonly was created. We no longer need to build and install another module to make Readonly useful on modern builds of perl.</p> <ul> <li><p>You do not need to install Readonly::XS.</p> </li> <li><p>You should stop listing Readonly::XS as a dependency or expect it to be installed.</p> </li> <li><p>Stop testing the <code>$Readonly::XSokay</code> variable!</p> </li> </ul> <h1 id="Requirements">Requirements</h1> <p>Please note that most users of Readonly no longer need to install the companion module Readonly::XS which is recommended but not required for perl 5.6.x and under. Please do not force it as a requirement in new code and do not use the package variable <code>$Readonly::XSokay</code> in code/tests. For more, see <a href="/pod/the section on Readonly&#39;s new internals#Internals">&quot;Internals&quot; in the section on Readonly&#39;s new internals</a>.</p> <p>There are no non-core requirements.</p> <h1 id="Bug-Reports"><a id="Bug"></a>Bug Reports</h1> <p>If email is better for you, <a href="#Author">my address is mentioned below</a> but I would rather have bugs sent through the issue tracker found at http://github.com/sanko/readonly/issues.</p> <h1 id="Acknowledgements">Acknowledgements</h1> <p>Thanks to Slaven Rezic for the idea of one common function (Readonly) for all three types of variables (13 April 2002).</p> <p>Thanks to Ernest Lergon for the idea (and initial code) for deeply-Readonly data structures (21 May 2002).</p> <p>Thanks to Damian Conway for the idea (and code) for making the Readonly function work a lot smoother under perl 5.8+.</p> <h1 id="Author">Author</h1> <p>Sanko Robinson &lt;sanko@cpan.org&gt; - http://sankorobinson.com/</p> <p>CPAN ID: SANKO</p> <p>Original author: Eric J. Roode, roode@cpan.org</p> <h1 id="License-and-Legal"><a id="License"></a>License and Legal</h1> <p>Copyright (C) 2013-2016 by Sanko Robinson &lt;sanko@cpan.org&gt;</p> <p>Copyright (c) 2001-2004 by Eric J. Roode. All Rights Reserved.</p> <p>This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</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">&times;</button> <h4 class="modal-title">Module Install Instructions</h4> </div> <div class="modal-body"> <p>To install Readonly, 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 Readonly</code></pre> <p><a href="/pod/CPAN">CPAN shell</a></p> <pre><code>perl -MCPAN -e shell install Readonly</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">&times;</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>

Pages: 1 2 3 4 5 6 7 8 9 10