CINXE.COM
Ref::Util - Utility functions for checking references - metacpan.org
<!DOCTYPE html> <html lang="en-US"> <head> <title>Ref::Util - Utility functions for checking references - 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 Ref-Util - MetaCPAN" href="/dist/Ref-Util/releases.rss" /> <link rel="canonical" href="https://metacpan.org/pod/Ref::Util" /> <meta name="description" content="Utility functions for checking references" /> <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/Ref::Util" /> <meta property="og:title" content="Ref::Util" /> <meta property="og:description" content="Utility functions for checking references" /> <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 Ref-Util was released."> <span class="relatize">19 Apr 2018 11:23:10 UTC</span> </div> </li> <li> Distribution: <a href="/dist/Ref-Util">Ref-Util</a> </li> <li> Module version: 0.204 </li> <li> <a data-keyboard-shortcut="g s" href="/dist/Ref-Util/source/lib/Ref/Util.pm">Source</a> (<a href="/dist/Ref-Util/source/lib/Ref/Util.pm?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g b" href="/dist/Ref-Util/source/lib/Ref">Browse</a> (<a href="/dist/Ref-Util/source/lib/Ref?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g c" href="/dist/Ref-Util/changes">Changes</a> </li> <li> <a class="nopopup" href="/dist/Ref-Util/contribute">How to Contribute</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/p5pclub/ref-util">Repository</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/p5pclub/ref-util/issues">Issues</a> (6) </li> <li> <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Ref-Util+0.204" title="Matrix">Testers</a> <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Ref-Util.html?oncpan=1&distmat=1&version=0.204&grade=2" style="color: #090">16391</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Ref-Util.html?oncpan=1&distmat=1&version=0.204&grade=3" style="color: #900">2</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Ref-Util.html?oncpan=1&distmat=1&version=0.204&grade=4">1</a>)</span> </li> <li> <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/ARC/Ref-Util-0.204">Kwalitee</a> </li> <li> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Ref-Util 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: 0 </div> </li> <li> <a rel="noopener nofollow" href="http://cpancover.com/latest/Ref-Util-0.204/index.html">100.00% Coverage </a> </li> <li> License: mit </li> <li> Perl: v5.6.0 </li> <li class="nav-header">Activity</li> <li> <div class="activity-graph"> <img src="/dist/Ref-Util/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/A/AR/ARC/Ref-Util-0.204.tar.gz"> Download (<span itemprop="fileSize">26.86KB</span>)</a> </li> <li> <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FARC%2FRef-Util-0.204%2Flib%2FRef%2FUtil.pm"> MetaCPAN Explorer </a> </li> <li> <a href="/dist/Ref-Util/permissions"> Permissions </a> </li> <li> <a href="/dist/Ref-Util/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:Ref-Util"> <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="Ref-Util"> <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/ARC/Ref-Util-0.204/view/lib/Ref/Util.pm" >0.204 (ARC on 2018-04-19)</option> <option value="/release/ARC/Ref-Util-0.203/view/lib/Ref/Util.pm" >0.203 (ARC on 2017-05-14)</option> <option value="/release/ARC/Ref-Util-0.202/view/lib/Ref/Util.pm" >0.202 (ARC on 2017-05-14)</option> <option value="/release/ARC/Ref-Util-0.201/view/lib/Ref/Util.pm" >0.201 (ARC on 2017-05-12)</option> <option value="/release/ARC/Ref-Util-0.200/view/lib/Ref/Util.pm" >0.200 (ARC on 2017-05-12)</option> <option value="/release/XSAWYERX/Ref-Util-0.113/view/lib/Ref/Util.pm" >0.113 (XSAWYERX on 2017-01-16)</option> <option value="/release/XSAWYERX/Ref-Util-0.112/view/lib/Ref/Util.pm" >0.112 (XSAWYERX on 2017-01-15)</option> <option value="/release/XSAWYERX/Ref-Util-0.111/view/lib/Ref/Util.pm" >0.111 (XSAWYERX on 2016-12-30)</option> <optgroup label="BackPAN">' <option value="/release/XSAWYERX/Ref-Util-0.110/view/lib/Ref/Util.pm" >0.110 (XSAWYERX on 2016-12-29)</option> <option value="/release/XSAWYERX/Ref-Util-0.101/view/lib/Ref/Util.pm" >0.101 (XSAWYERX on 2016-08-29)</option> <option value="/release/XSAWYERX/Ref-Util-0.100/view/lib/Ref/Util.pm" >0.100 (XSAWYERX on 2016-08-27)</option> <option value="/release/XSAWYERX/Ref-Util-0.020/view/lib/Ref/Util.pm" >0.020 (XSAWYERX on 2016-05-02)</option> <option value="/release/XSAWYERX/Ref-Util-0.011/view/lib/Ref/Util.pm" >0.011 (XSAWYERX on 2016-04-29)</option> <option value="/release/XSAWYERX/Ref-Util-0.010/view/lib/Ref/Util.pm" >0.010 (XSAWYERX on 2016-04-29)</option> <option value="/release/XSAWYERX/Ref-Util-0.008/view/lib/Ref/Util.pm" >0.008 (XSAWYERX on 2016-01-23)</option> <option value="/release/XSAWYERX/Ref-Util-0.007/view/lib/Ref/Util.pm" >0.007 (XSAWYERX on 2016-01-09)</option> <option value="/release/XSAWYERX/Ref-Util-0.006/view/lib/Ref/Util.pm" >0.006 (XSAWYERX on 2016-01-01)</option> <option value="/release/XSAWYERX/Ref-Util-0.005/view/lib/Ref/Util.pm" >0.005 (XSAWYERX on 2015-12-28)</option> <option value="/release/XSAWYERX/Ref-Util-0.004/view/lib/Ref/Util.pm" >0.004 (XSAWYERX on 2015-12-18)</option> <option value="/release/XSAWYERX/Ref-Util-0.003/view/lib/Ref/Util.pm" >0.003 (XSAWYERX on 2015-12-16)</option> <option value="/release/XSAWYERX/Ref-Util-0.002/view/lib/Ref/Util.pm" >0.002 (XSAWYERX on 2015-12-05)</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/ARC/Ref-Util-0.204/diff/ARC/Ref-Util-0.204/lib/Ref/Util.pm" >0.204 (ARC on 2018-04-19)</option> <option value="/release/ARC/Ref-Util-0.204/diff/ARC/Ref-Util-0.203/lib/Ref/Util.pm" >0.203 (ARC on 2017-05-14)</option> <option value="/release/ARC/Ref-Util-0.204/diff/ARC/Ref-Util-0.202/lib/Ref/Util.pm" >0.202 (ARC on 2017-05-14)</option> <option value="/release/ARC/Ref-Util-0.204/diff/ARC/Ref-Util-0.201/lib/Ref/Util.pm" >0.201 (ARC on 2017-05-12)</option> <option value="/release/ARC/Ref-Util-0.204/diff/ARC/Ref-Util-0.200/lib/Ref/Util.pm" >0.200 (ARC on 2017-05-12)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.113/lib/Ref/Util.pm" >0.113 (XSAWYERX on 2017-01-16)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.112/lib/Ref/Util.pm" >0.112 (XSAWYERX on 2017-01-15)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.111/lib/Ref/Util.pm" >0.111 (XSAWYERX on 2016-12-30)</option> <optgroup label="BackPAN">' <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.110/lib/Ref/Util.pm" >0.110 (XSAWYERX on 2016-12-29)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.101/lib/Ref/Util.pm" >0.101 (XSAWYERX on 2016-08-29)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.100/lib/Ref/Util.pm" >0.100 (XSAWYERX on 2016-08-27)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.020/lib/Ref/Util.pm" >0.020 (XSAWYERX on 2016-05-02)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.011/lib/Ref/Util.pm" >0.011 (XSAWYERX on 2016-04-29)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.010/lib/Ref/Util.pm" >0.010 (XSAWYERX on 2016-04-29)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.008/lib/Ref/Util.pm" >0.008 (XSAWYERX on 2016-01-23)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.007/lib/Ref/Util.pm" >0.007 (XSAWYERX on 2016-01-09)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.006/lib/Ref/Util.pm" >0.006 (XSAWYERX on 2016-01-01)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.005/lib/Ref/Util.pm" >0.005 (XSAWYERX on 2015-12-28)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.004/lib/Ref/Util.pm" >0.004 (XSAWYERX on 2015-12-18)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.003/lib/Ref/Util.pm" >0.003 (XSAWYERX on 2015-12-16)</option> <option value="/release/ARC/Ref-Util-0.204/diff/XSAWYERX/Ref-Util-0.002/lib/Ref/Util.pm" >0.002 (XSAWYERX on 2015-12-05)</option> </optgroup> </select> </li> <li> <ul class="dependencies"> <li class="nav-header">Dependencies</li> <li><a href="/pod/Exporter" title="Exporter" class="ellipsis">Exporter</a></li> <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li> <li> <hr> </li> <li> <a href="/module/Ref::Util/requires">Reverse dependencies</a> </li> <li> <a href="http://deps.cpantesters.org/?module=Ref%3A%3AUtil">CPAN Testers List</a> </li> <li> <a href="https://cpandeps.grinnz.com/?dist=Ref-Util">Dependency graph</a> </li> </ul> </li> <li class="nav-header">Permalinks</li> <li> <a href="/release/ARC/Ref-Util-0.204/view/lib/Ref/Util.pm">This version</a> </li> <li> <a href="/pod/Ref::Util">Latest version</a> </li> <li> <div class="plussers"> <div class="nav-header">++ed by:</div> <div> <a class="display-all" href="/author/MELO"><img src="https://www.gravatar.com/avatar/4809188f41ad2613f4c240b72d97604c?d=identicon&s=20" title="MELO" alt="MELO"></a> <a class="display-all" href="/author/PABLROD"><img src="https://www.gravatar.com/avatar/ebde00b92598043f6cf8d9071e7d5c2b?d=identicon&s=20" title="PABLROD" alt="PABLROD"></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> <a class="display-all" href="/author/JAYALLEN"><img src="https://www.gravatar.com/avatar/34e155145f5145d2e30979313b334327?d=identicon&s=20" title="JAYALLEN" alt="JAYALLEN"></a> <a class="display-all" href="/author/JJATRIA"><img src="https://www.gravatar.com/avatar/c796997d2231a41e24f485e4726ea810?d=identicon&s=20" title="JJATRIA" alt="JJATRIA"></a> </div> <!-- Display counts of plussers--> <div> <a href="/dist/Ref-Util/plussers">12 PAUSE users</a> </div> <div> 18 non-PAUSE users </div> </div> </li> <li> <div> <button class="contributors-show-button btn-link">and 4 contributors</button> <div id="metacpan_contributors" class="slide-out slide-out-hidden"> <div> <ul> <li class="contributor" data-cpan-author="GONZUS" data-contrib-email="gonzus@cpan.org" > <a href="/author/GONZUS" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d3949f4c570e706326cadf1c257adc2c?d=identicon&s=20" /> Gonzalo Diethelm </a> </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="XSAWYERX" data-contrib-email="xsawyerx@cpan.org" > <a href="/author/XSAWYERX" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/f2bdad6d5883044b9d3c88e50f957bfc?d=identicon&s=20" /> Sawyer X </a> </li> <li class="contributor" data-cpan-author="VYF" data-contrib-email="vyf@cpan.org" > <a href="/author/VYF" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/697b24faaffe785554bc7be041dd087d?d=identicon&s=20" /> Vikenty Fesunov </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/ARC" class="author-name">Aaron Crane</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/ARC/Ref-Util-0.204/view/lib/Ref/Util.pm" >0.204 (ARC on 2018-04-19)</option> <option value="/release/ARC/Ref-Util-0.203/view/lib/Ref/Util.pm" >0.203 (ARC on 2017-05-14)</option> <option value="/release/ARC/Ref-Util-0.202/view/lib/Ref/Util.pm" >0.202 (ARC on 2017-05-14)</option> <option value="/release/ARC/Ref-Util-0.201/view/lib/Ref/Util.pm" >0.201 (ARC on 2017-05-12)</option> <option value="/release/ARC/Ref-Util-0.200/view/lib/Ref/Util.pm" >0.200 (ARC on 2017-05-12)</option> <option value="/release/XSAWYERX/Ref-Util-0.113/view/lib/Ref/Util.pm" >0.113 (XSAWYERX on 2017-01-16)</option> <option value="/release/XSAWYERX/Ref-Util-0.112/view/lib/Ref/Util.pm" >0.112 (XSAWYERX on 2017-01-15)</option> <option value="/release/XSAWYERX/Ref-Util-0.111/view/lib/Ref/Util.pm" >0.111 (XSAWYERX on 2016-12-30)</option> <optgroup label="BackPAN">' <option value="/release/XSAWYERX/Ref-Util-0.110/view/lib/Ref/Util.pm" >0.110 (XSAWYERX on 2016-12-29)</option> <option value="/release/XSAWYERX/Ref-Util-0.101/view/lib/Ref/Util.pm" >0.101 (XSAWYERX on 2016-08-29)</option> <option value="/release/XSAWYERX/Ref-Util-0.100/view/lib/Ref/Util.pm" >0.100 (XSAWYERX on 2016-08-27)</option> <option value="/release/XSAWYERX/Ref-Util-0.020/view/lib/Ref/Util.pm" >0.020 (XSAWYERX on 2016-05-02)</option> <option value="/release/XSAWYERX/Ref-Util-0.011/view/lib/Ref/Util.pm" >0.011 (XSAWYERX on 2016-04-29)</option> <option value="/release/XSAWYERX/Ref-Util-0.010/view/lib/Ref/Util.pm" >0.010 (XSAWYERX on 2016-04-29)</option> <option value="/release/XSAWYERX/Ref-Util-0.008/view/lib/Ref/Util.pm" >0.008 (XSAWYERX on 2016-01-23)</option> <option value="/release/XSAWYERX/Ref-Util-0.007/view/lib/Ref/Util.pm" >0.007 (XSAWYERX on 2016-01-09)</option> <option value="/release/XSAWYERX/Ref-Util-0.006/view/lib/Ref/Util.pm" >0.006 (XSAWYERX on 2016-01-01)</option> <option value="/release/XSAWYERX/Ref-Util-0.005/view/lib/Ref/Util.pm" >0.005 (XSAWYERX on 2015-12-28)</option> <option value="/release/XSAWYERX/Ref-Util-0.004/view/lib/Ref/Util.pm" >0.004 (XSAWYERX on 2015-12-18)</option> <option value="/release/XSAWYERX/Ref-Util-0.003/view/lib/Ref/Util.pm" >0.003 (XSAWYERX on 2015-12-16)</option> <option value="/release/XSAWYERX/Ref-Util-0.002/view/lib/Ref/Util.pm" >0.002 (XSAWYERX on 2015-12-05)</option> </optgroup> </select> <a data-keyboard-shortcut="g d" class="release-name" href="/dist/Ref-Util">Ref-Util-0.204</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 three • 159 direct dependents • 388 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="#e4e2e2" /> <rect x="20" y="0" width="4" height="15" fill="#e4e2e2" /> </g> </svg> </span> <div id="Ref-Util-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="Ref-Util-0.204"> <input type="hidden" name="author" value="ARC"> <input type="hidden" name="distribution" value="Ref-Util"> <button type="submit" class="favorite highlight"><span>30</span> ++</button> </form> </div> <div class="show-logged-out"> <button class="fav-not-logged-in favorite highlight"><span>30</span> ++</button> </div> / <span>Ref::Util</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="#EXPORT">EXPORT</a></li> <li><a href="#SUBROUTINES">SUBROUTINES</a> <ul> <li><a href="#is_ref(%24ref)">is_ref($ref)</a></li> <li><a href="#is_scalarref(%24ref)">is_scalarref($ref)</a></li> <li><a href="#is_arrayref(%24ref)">is_arrayref($ref)</a></li> <li><a href="#is_hashref(%24ref)">is_hashref($ref)</a></li> <li><a href="#is_coderef(%24ref)">is_coderef($ref)</a></li> <li><a href="#is_regexpref(%24ref)">is_regexpref($ref)</a></li> <li><a href="#is_globref(%24ref)">is_globref($ref)</a></li> <li><a href="#is_formatref(%24ref)">is_formatref($ref)</a></li> <li><a href="#is_ioref(%24ref)">is_ioref($ref)</a></li> <li><a href="#is_refref(%24ref)">is_refref($ref)</a></li> <li><a href="#is_plain_scalarref(%24ref)">is_plain_scalarref($ref)</a></li> <li><a href="#is_plain_ref(%24ref)">is_plain_ref($ref)</a></li> <li><a href="#is_plain_arrayref(%24ref)">is_plain_arrayref($ref)</a></li> <li><a href="#is_plain_hashref(%24ref)">is_plain_hashref($ref)</a></li> <li><a href="#is_plain_coderef(%24ref)">is_plain_coderef($ref)</a></li> <li><a href="#is_plain_globref(%24ref)">is_plain_globref($ref)</a></li> <li><a href="#is_plain_formatref(%24ref)">is_plain_formatref($ref)</a></li> <li><a href="#is_plain_refref(%24ref)">is_plain_refref($ref)</a></li> <li><a href="#is_blessed_scalarref(%24ref)">is_blessed_scalarref($ref)</a></li> <li><a href="#is_blessed_ref(%24ref)">is_blessed_ref($ref)</a></li> <li><a href="#is_blessed_arrayref(%24ref)">is_blessed_arrayref($ref)</a></li> <li><a href="#is_blessed_hashref(%24ref)">is_blessed_hashref($ref)</a></li> <li><a href="#is_blessed_coderef(%24ref)">is_blessed_coderef($ref)</a></li> <li><a href="#is_blessed_globref(%24ref)">is_blessed_globref($ref)</a></li> <li><a href="#is_blessed_formatref(%24ref)">is_blessed_formatref($ref)</a></li> <li><a href="#is_blessed_refref(%24ref)">is_blessed_refref($ref)</a></li> </ul> </li> <li><a href="#BENCHMARKS">BENCHMARKS</a></li> <li><a href="#SEE-ALSO">SEE ALSO</a></li> <li><a href="#THANKS">THANKS</a></li> <li><a href="#AUTHORS">AUTHORS</a></li> <li><a href="#LICENSE">LICENSE</a></li> <li><a href="#AUTHORS1">AUTHORS</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>Ref::Util - Utility functions for checking references</p> <h1 id="VERSION">VERSION</h1> <p>version 0.204</p> <h1 id="SYNOPSIS">SYNOPSIS</h1> <pre><code>use Ref::Util qw( is_plain_arrayref is_plain_hashref ); if ( is_plain_arrayref( $something ) ) { print for @{ $something }; } elsif ( is_plain_hashref( $something ) ) { print for sort values %{ $something }; }</code></pre> <h1 id="DESCRIPTION">DESCRIPTION</h1> <p>Ref::Util introduces several functions to help identify references in a <b>smarter</b> (and usually faster) way. In short:</p> <pre><code># conventional approach # with Ref::Util ref( $foo ) eq 'ARRAY' is_plain_arrayref( $foo ) use Scalar::Util qw( reftype ); reftype( $foo ) eq 'ARRAY' is_arrayref( $foo )</code></pre> <p>The difference:</p> <ul> <li><p>No comparison against a string constant</p> <p>When you call <code>ref</code>, you stringify the reference and then compare it to some string constant (like <code>ARRAY</code> or <code>HASH</code>). Not just awkward, it's brittle since you can mispell the string.</p> <p>If you use <a href="/pod/Scalar::Util">Scalar::Util</a>'s <code>reftype</code>, you still compare it as a string:</p> <pre><code>if ( reftype($foo) eq 'ARRAY' ) { ... }</code></pre> </li> <li><p>Supports blessed variables</p> <p><b>Note:</b> In future versions, the idea is to make the default functions use the <b>plain</b> variation, which means explicitly non-blessed references.</p> <p>If you want to explicitly check for <b>blessed</b> references, you should use the <code>is_blessed_*</code> functions. There will be an <code>is_any_*</code> variation which will act like the current main functions - not caring whether it's blessed or not.</p> <p>When calling <code>ref</code>, you receive either the reference type (<b>SCALAR</b>, <b>ARRAY</b>, <b>HASH</b>, etc.) or the package it's blessed into.</p> <p>When calling <code>is_arrayref</code> (et. al.), you check the variable flags, so even if it's blessed, you know what type of variable is blessed.</p> <pre><code>my $foo = bless {}, 'PKG'; ref($foo) eq 'HASH'; # fails use Ref::Util 'is_hashref'; my $foo = bless {}, 'PKG'; is_hashref($foo); # works</code></pre> <p>On the other hand, in some situations it might be better to specifically exclude blessed references. The rationale for that might be that merely because some object happens to be implemented using a hash doesn't mean it's necessarily correct to treat it as a hash. For these situations, you can use <code>is_plain_hashref</code> and friends, which have the same performance benefits as <code>is_hashref</code>.</p> <p>There is also a family of functions with names like <code>is_blessed_hashref</code>; these return true for blessed object instances that are implemented using the relevant underlying type.</p> </li> <li><p>Supports tied variables and magic</p> <p>Tied variables (used in <a href="/pod/Readonly">Readonly</a>, for example) are supported.</p> <pre><code>use Ref::Util qw<is_plain_hashref>; use Readonly; Readonly::Scalar my $rh2 => { a => { b => 2 } }; is_plain_hashref($rh2); # success</code></pre> <p><a href="/pod/Ref::Util">Ref::Util</a> added support for this in 0.100. Prior to this version the test would fail.</p> </li> <li><p>Ignores overloading</p> <p>These functions ignore overloaded operators and simply check the variable type. Overloading will likely not ever be supported, since I deem it problematic and confusing.</p> <p>Overloading makes your variables opaque containers and hides away <b>what</b> they are and instead require you to figure out <b>how</b> to use them. This leads to code that has to test different abilities (in <code>eval</code>, so it doesn't crash) and to interfaces that get around what a person thought you would do with a variable. This would have been alright, except there is no clear way of introspecting it.</p> </li> <li><p>Ignores subtle types:</p> <p>The following types, provided by <a href="/pod/Scalar::Util">Scalar::Util</a>'s <code>reftype</code>, are not supported:</p> <ul> <li><p><code>VSTRING</code></p> <p>This is a <code>PVMG</code> ("normal" variable) with a flag set for VSTRINGs. Since this is not a reference, it is not supported.</p> </li> <li><p><code>LVALUE</code></p> <p>A variable that delegates to another scalar. Since this is not a reference, it is not supported.</p> </li> <li><p><code>INVLIST</code></p> <p>I couldn't find documentation for this type.</p> </li> </ul> <p>Support might be added, if a good reason arises.</p> </li> <li><p>Usually fast</p> <p>When possible, Ref::Util uses <a href="/pod/Ref::Util::XS">Ref::Util::XS</a> as its implementation. (If you don't have a C compiler available, it uses a pure Perl fallback that has all the other advantages of Ref::Util, but isn't as fast.)</p> <p>In fact, Ref::Util::XS has two alternative implementations available internally, depending on the features supported by the version of Perl you're using. For Perls that supports custom OPs, we actually add an OP (which is faster); for other Perls, the implementation that simply calls an XS function (which is still faster than the pure-Perl equivalent).</p> <p>See below for <a href="#BENCHMARKS">benchmark results</a>.</p> </li> </ul> <h1 id="EXPORT">EXPORT</h1> <p>Nothing is exported by default. You can ask for specific subroutines (described below) or ask for all subroutines at once:</p> <pre><code>use Ref::Util qw<is_scalarref is_arrayref is_hashref ...>; # or use Ref::Util ':all';</code></pre> <h1 id="SUBROUTINES">SUBROUTINES</h1> <h2 id="is_ref($ref)"><a id="is_ref"></a><a id="is_ref-ref"></a>is_ref($ref)</h2> <p>Check for a reference to anything.</p> <pre><code>is_ref([]);</code></pre> <h2 id="is_scalarref($ref)"><a id="is_scalarref"></a><a id="is_scalarref-ref"></a>is_scalarref($ref)</h2> <p>Check for a scalar reference.</p> <pre><code>is_scalarref(\"hello"); is_scalarref(\30); is_scalarref(\$value);</code></pre> <p>Note that, even though a reference is itself a type of scalar value, a reference to another reference is not treated as a scalar reference:</p> <pre><code>!is_scalarref(\\1);</code></pre> <p>The rationale for this is two-fold. First, callers that want to decide how to handle inputs based on their reference type will usually want to treat a ref-ref and a scalar-ref differently. Secondly, this more closely matches the behavior of the <code>ref</code> built-in and of <a href="/pod/Scalar::Util#reftype">"reftype" in Scalar::Util</a>, which report a ref-ref as <code>REF</code> rather than <code>SCALAR</code>.</p> <h2 id="is_arrayref($ref)"><a id="is_arrayref"></a><a id="is_arrayref-ref"></a>is_arrayref($ref)</h2> <p>Check for an array reference.</p> <pre><code>is_arrayref([]);</code></pre> <h2 id="is_hashref($ref)"><a id="is_hashref"></a><a id="is_hashref-ref"></a>is_hashref($ref)</h2> <p>Check for a hash reference.</p> <pre><code>is_hashref({});</code></pre> <h2 id="is_coderef($ref)"><a id="is_coderef"></a><a id="is_coderef-ref"></a>is_coderef($ref)</h2> <p>Check for a code reference.</p> <pre><code>is_coderef( sub {} );</code></pre> <h2 id="is_regexpref($ref)"><a id="is_regexpref"></a><a id="is_regexpref-ref"></a>is_regexpref($ref)</h2> <p>Check for a regular expression (regex, regexp) reference.</p> <pre><code>is_regexpref( qr// );</code></pre> <h2 id="is_globref($ref)"><a id="is_globref"></a><a id="is_globref-ref"></a>is_globref($ref)</h2> <p>Check for a glob reference.</p> <pre><code>is_globref( \*STDIN );</code></pre> <h2 id="is_formatref($ref)"><a id="is_formatref"></a><a id="is_formatref-ref"></a>is_formatref($ref)</h2> <p>Check for a format reference.</p> <pre><code># set up format in STDOUT format STDOUT = . # now we can test it is_formatref( *main::STDOUT{'FORMAT'} );</code></pre> <p>This function is not available in Perl 5.6 and will trigger a <code>croak()</code>.</p> <h2 id="is_ioref($ref)"><a id="is_ioref"></a><a id="is_ioref-ref"></a>is_ioref($ref)</h2> <p>Check for an IO reference.</p> <pre><code>is_ioref( *STDOUT{IO} );</code></pre> <h2 id="is_refref($ref)"><a id="is_refref"></a><a id="is_refref-ref"></a>is_refref($ref)</h2> <p>Check for a reference to a reference.</p> <pre><code>is_refref( \[] ); # reference to array reference</code></pre> <h2 id="is_plain_scalarref($ref)"><a id="is_plain_scalarref"></a><a id="is_plain_scalarref-ref"></a>is_plain_scalarref($ref)</h2> <p>Check for an unblessed scalar reference.</p> <pre><code>is_plain_scalarref(\"hello"); is_plain_scalarref(\30); is_plain_scalarref(\$value);</code></pre> <h2 id="is_plain_ref($ref)"><a id="is_plain_ref"></a><a id="is_plain_ref-ref"></a>is_plain_ref($ref)</h2> <p>Check for an unblessed reference to anything.</p> <pre><code>is_plain_ref([]);</code></pre> <h2 id="is_plain_arrayref($ref)"><a id="is_plain_arrayref"></a><a id="is_plain_arrayref-ref"></a>is_plain_arrayref($ref)</h2> <p>Check for an unblessed array reference.</p> <pre><code>is_plain_arrayref([]);</code></pre> <h2 id="is_plain_hashref($ref)"><a id="is_plain_hashref"></a><a id="is_plain_hashref-ref"></a>is_plain_hashref($ref)</h2> <p>Check for an unblessed hash reference.</p> <pre><code>is_plain_hashref({});</code></pre> <h2 id="is_plain_coderef($ref)"><a id="is_plain_coderef"></a><a id="is_plain_coderef-ref"></a>is_plain_coderef($ref)</h2> <p>Check for an unblessed code reference.</p> <pre><code>is_plain_coderef( sub {} );</code></pre> <h2 id="is_plain_globref($ref)"><a id="is_plain_globref"></a><a id="is_plain_globref-ref"></a>is_plain_globref($ref)</h2> <p>Check for an unblessed glob reference.</p> <pre><code>is_plain_globref( \*STDIN );</code></pre> <h2 id="is_plain_formatref($ref)"><a id="is_plain_formatref"></a><a id="is_plain_formatref-ref"></a>is_plain_formatref($ref)</h2> <p>Check for an unblessed format reference.</p> <pre><code># set up format in STDOUT format STDOUT = . # now we can test it is_plain_formatref(bless *main::STDOUT{'FORMAT'} );</code></pre> <h2 id="is_plain_refref($ref)"><a id="is_plain_refref"></a><a id="is_plain_refref-ref"></a>is_plain_refref($ref)</h2> <p>Check for an unblessed reference to a reference.</p> <pre><code>is_plain_refref( \[] ); # reference to array reference</code></pre> <h2 id="is_blessed_scalarref($ref)"><a id="is_blessed_scalarref"></a><a id="is_blessed_scalarref-ref"></a>is_blessed_scalarref($ref)</h2> <p>Check for a blessed scalar reference.</p> <pre><code>is_blessed_scalarref(bless \$value);</code></pre> <h2 id="is_blessed_ref($ref)"><a id="is_blessed_ref"></a><a id="is_blessed_ref-ref"></a>is_blessed_ref($ref)</h2> <p>Check for a blessed reference to anything.</p> <pre><code>is_blessed_ref(bless [], $class);</code></pre> <h2 id="is_blessed_arrayref($ref)"><a id="is_blessed_arrayref"></a><a id="is_blessed_arrayref-ref"></a>is_blessed_arrayref($ref)</h2> <p>Check for a blessed array reference.</p> <pre><code>is_blessed_arrayref(bless [], $class);</code></pre> <h2 id="is_blessed_hashref($ref)"><a id="is_blessed_hashref"></a><a id="is_blessed_hashref-ref"></a>is_blessed_hashref($ref)</h2> <p>Check for a blessed hash reference.</p> <pre><code>is_blessed_hashref(bless {}, $class);</code></pre> <h2 id="is_blessed_coderef($ref)"><a id="is_blessed_coderef"></a><a id="is_blessed_coderef-ref"></a>is_blessed_coderef($ref)</h2> <p>Check for a blessed code reference.</p> <pre><code>is_blessed_coderef( bless sub {}, $class );</code></pre> <h2 id="is_blessed_globref($ref)"><a id="is_blessed_globref"></a><a id="is_blessed_globref-ref"></a>is_blessed_globref($ref)</h2> <p>Check for a blessed glob reference.</p> <pre><code>is_blessed_globref( bless \*STDIN, $class );</code></pre> <h2 id="is_blessed_formatref($ref)"><a id="is_blessed_formatref"></a><a id="is_blessed_formatref-ref"></a>is_blessed_formatref($ref)</h2> <p>Check for a blessed format reference.</p> <pre><code># set up format for FH format FH = . # now we can test it is_blessed_formatref(bless *FH{'FORMAT'}, $class );</code></pre> <h2 id="is_blessed_refref($ref)"><a id="is_blessed_refref"></a><a id="is_blessed_refref-ref"></a>is_blessed_refref($ref)</h2> <p>Check for a blessed reference to a reference.</p> <pre><code>is_blessed_refref( bless \[], $class ); # reference to array reference</code></pre> <h1 id="BENCHMARKS">BENCHMARKS</h1> <p>Here is a benchmark comparing similar checks.</p> <pre><code>my $bench = Dumbbench->new( target_rel_precision => 0.005, initial_runs => 20, ); my $amount = 1e7; my $ref = []; $bench->add_instances( Dumbbench::Instance::PerlSub->new( name => 'Ref::Util::is_plain_arrayref (CustomOP)', code => sub { Ref::Util::is_plain_arrayref($ref) for ( 1 .. $amount ) }, ), Dumbbench::Instance::PerlSub->new( name => 'ref(), reftype(), !blessed()', code => sub { ref $ref && Scalar::Util::reftype($ref) eq 'ARRAY' && !Scalar::Util::blessed($ref) for ( 1 .. $amount ); }, ), Dumbbench::Instance::PerlSub->new( name => 'ref()', code => sub { ref($ref) eq 'ARRAY' for ( 1 .. $amount ) }, ), Dumbbench::Instance::PerlSub->new( name => 'Data::Util::is_array_ref', code => sub { is_array_ref($ref) for ( 1 .. $amount ) }, ), );</code></pre> <p>The results:</p> <pre><code>ref(): 5.335e+00 +/- 1.8e-02 (0.3%) ref(), reftype(), !blessed(): 1.5545e+01 +/- 3.1e-02 (0.2%) Ref::Util::is_plain_arrayref (CustomOP): 2.7951e+00 +/- 6.2e-03 (0.2%) Data::Util::is_array_ref: 5.9074e+00 +/- 7.5e-03 (0.1%)</code></pre> <p>(Rounded run time per iteration)</p> <p>A benchmark against <a href="/pod/Data::Util">Data::Util</a>:</p> <pre><code>Ref::Util::is_plain_arrayref: 3.47157e-01 +/- 6.8e-05 (0.0%) Data::Util::is_array_ref: 6.7562e-01 +/- 7.5e-04 (0.1%)</code></pre> <h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1> <ul> <li><p><a href="/pod/Params::Classify">Params::Classify</a></p> </li> <li><p><a href="/pod/Scalar::Util">Scalar::Util</a></p> </li> <li><p><a href="/pod/Data::Util">Data::Util</a></p> </li> </ul> <h1 id="THANKS">THANKS</h1> <p>The following people have been invaluable in their feedback and support.</p> <ul> <li><p>Yves Orton</p> </li> <li><p>Steffen Müller</p> </li> <li><p>Jarkko Hietaniemi</p> </li> <li><p>Mattia Barbon</p> </li> <li><p>Zefram</p> </li> <li><p>Tony Cook</p> </li> <li><p>Sergey Aleynikov</p> </li> </ul> <h1 id="AUTHORS">AUTHORS</h1> <ul> <li><p>Aaron Crane</p> </li> <li><p>Vikentiy Fesunov</p> </li> <li><p>Sawyer X</p> </li> <li><p>Gonzalo Diethelm</p> </li> <li><p>p5pclub</p> </li> </ul> <h1 id="LICENSE">LICENSE</h1> <p>This software is made available under the MIT Licence as stated in the accompanying LICENSE file.</p> <h1 id="AUTHORS1">AUTHORS</h1> <ul> <li><p>Sawyer X <xsawyerx@cpan.org></p> </li> <li><p>Aaron Crane <arc@cpan.org></p> </li> <li><p>Vikenty Fesunov <vyf@cpan.org></p> </li> <li><p>Gonzalo Diethelm <gonzus@cpan.org></p> </li> <li><p>Karen Etheridge <ether@cpan.org></p> </li> </ul> <h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1> <p>This software is Copyright (c) 2017 by Sawyer X.</p> <p>This is free software, licensed under:</p> <pre><code>The MIT (X11) License</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 Ref::Util, 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 Ref::Util</code></pre> <p><a href="/pod/CPAN">CPAN shell</a></p> <pre><code>perl -MCPAN -e shell install Ref::Util</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>