CINXE.COM
Text::Format - Various subroutines to format text. - metacpan.org
<!DOCTYPE html> <html lang="en-US"> <head> <title>Text::Format - Various subroutines to format text. - 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 Text-Format - MetaCPAN" href="/dist/Text-Format/releases.rss" /> <link rel="canonical" href="https://metacpan.org/pod/Text::Format" /> <meta name="description" content="Various subroutines to format text." /> <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/Text::Format" /> <meta property="og:title" content="Text::Format" /> <meta property="og:description" content="Various subroutines to format text." /> <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 Text-Format was released."> <span class="relatize">07 Sep 2024 06:33:39 UTC</span> </div> </li> <li> Distribution: <a href="/dist/Text-Format">Text-Format</a> </li> <li> Module version: 0.63 </li> <li> <a data-keyboard-shortcut="g s" href="/dist/Text-Format/source/lib/Text/Format.pm">Source</a> (<a href="/dist/Text-Format/source/lib/Text/Format.pm?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g b" href="/dist/Text-Format/source/lib/Text">Browse</a> (<a href="/dist/Text-Format/source/lib/Text?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g c" href="/dist/Text-Format/changes">Changes</a> </li> <li> <a rel="noopener nofollow" class="nopopup" href="http://www.shlomifish.org/open-source/projects/Text-Format/">Homepage</a> </li> <li> <a class="nopopup" href="/dist/Text-Format/contribute">How to Contribute</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/shlomif/perl-Module-Format">Repository</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/shlomif/perl-Module-Format/issues">Issues</a> (0) </li> <li> <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Text-Format+0.63" title="Matrix">Testers</a> <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Text-Format.html?oncpan=1&distmat=1&version=0.63&grade=2" style="color: #090">430</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Text-Format.html?oncpan=1&distmat=1&version=0.63&grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Text-Format.html?oncpan=1&distmat=1&version=0.63&grade=4">0</a>)</span> </li> <li> <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/SHLOMIF/Text-Format-0.63">Kwalitee</a> </li> <li> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Text-Format 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> License: perl_5 </li> <li> Perl: v5.6.0 </li> <li class="nav-header">Activity</li> <li> <div class="activity-graph"> <img src="/dist/Text-Format/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/SH/SHLOMIF/Text-Format-0.63.tar.gz"> Download (<span itemprop="fileSize">27.54KB</span>)</a> </li> <li> <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FSHLOMIF%2FText-Format-0.63%2Flib%2FText%2FFormat.pm"> MetaCPAN Explorer </a> </li> <li> <a href="/dist/Text-Format/permissions"> Permissions </a> </li> <li> <a href="/dist/Text-Format/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:Text-Format"> <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="Text-Format"> <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/SHLOMIF/Text-Format-0.63/view/lib/Text/Format.pm" >0.63 (SHLOMIF on 2024-09-07)</option> <option value="/release/SHLOMIF/Text-Format-0.62/view/lib/Text/Format.pm" >0.62 (SHLOMIF on 2020-10-16)</option> <option value="/release/SHLOMIF/Text-Format-0.61/view/lib/Text/Format.pm" >0.61 (SHLOMIF on 2018-05-21)</option> <option value="/release/GABOR/Text-Format0.52/view/lib/Text/Format.pm" >0.52 (GABOR on 1998-03-29)</option> <option value="/release/GABOR/Text-Format0.52+NWrap0.11/view/lib/Text/Format.pm" >0.52+NWrap0.11 (GABOR on 1998-03-29)</option> <option value="/release/GABOR/Text-Format0.46/view/lib/Text/Format.pm" >0.46 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.46+NWrap0.11/view/lib/Text/Format.pm" >0.46+NWrap0.11 (GABOR on 1998-02-18)</option> <optgroup label="BackPAN">' <option value="/release/SHLOMIF/Text-Format-0.60/view/lib/Text/Format.pm" >0.60 (SHLOMIF on 2016-08-22)</option> <option value="/release/SHLOMIF/Text-Format-0.59/view/lib/Text/Format.pm" >0.59 (SHLOMIF on 2014-02-01)</option> <option value="/release/SHLOMIF/Text-Format-0.58/view/lib/Text/Format.pm" >0.58 (SHLOMIF on 2012-09-04)</option> <option value="/release/SHLOMIF/Text-Format-0.57/view/lib/Text/Format.pm" >0.57 (SHLOMIF on 2012-09-04)</option> <option value="/release/SHLOMIF/Text-Format-0.56/view/lib/Text/Format.pm" >0.56 (SHLOMIF on 2012-05-31)</option> <option value="/release/SHLOMIF/Text-Format-0.55/view/lib/Text/Format.pm" >0.55 (SHLOMIF on 2012-05-31)</option> <option value="/release/SHLOMIF/Text-Format-0.54/view/lib/Text/Format.pm" >0.54 (SHLOMIF on 2012-05-24)</option> <option value="/release/SHLOMIF/Text-Format-0.53/view/lib/Text/Format.pm" >0.53 (SHLOMIF on 2011-01-28)</option> <option value="/release/GABOR/Text-Format0.51/view/lib/Text/Format.pm" >0.51 (GABOR on 1998-03-15)</option> <option value="/release/GABOR/Text-Format0.51+NWrap0.11/view/lib/Text/Format.pm" >0.51+NWrap0.11 (GABOR on 1998-03-15)</option> <option value="/release/GABOR/Text-Format0.50/view/lib/Text/Format.pm" >0.50 (GABOR on 1998-02-21)</option> <option value="/release/GABOR/Text-Format0.50+NWrap0.11/view/lib/Text/Format.pm" >0.50+NWrap0.11 (GABOR on 1998-02-21)</option> <option value="/release/GABOR/Text-Format0.450/view/lib/Text/Format.pm" >0.450 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.450+NWrap0.11/view/lib/Text/Format.pm" >0.450+NWrap0.11 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.45+NWrap0.11/view/lib/Text/Format.pm" >0.45+NWrap0.11 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.45/view/lib/Text/Format.pm" >0.45 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.44/view/lib/Text/Format.pm" >0.44 (GABOR on 1998-02-12)</option> <option value="/release/GABOR/Text-Format0.44+NWrap0.11/view/lib/Text/Format.pm" >0.44+NWrap0.11 (GABOR on 1998-02-12)</option> <option value="/release/GABOR/Text-Format0.430/view/lib/Text/Format.pm" >0.430 (GABOR on 1998-02-11)</option> <option value="/release/GABOR/Text-Format0.43/view/lib/Text/Format.pm" >0.43 (GABOR on 1998-02-07)</option> <option value="/release/GABOR/Text-Format0.42/view/lib/Text/Format.pm" >0.42 (GABOR on 1998-02-07)</option> <option value="/release/GABOR/Text-Format0.41/view/lib/Text/Format.pm" >0.41 (GABOR on 1998-02-03)</option> <option value="/release/GABOR/Text-Format0.40/view/lib/Text/Format.pm" >0.40 (GABOR on 1998-01-30)</option> <option value="/release/GABOR/Text-Format0.33/view/lib/Text/Format.pm" >0.33 (GABOR on 1998-01-22)</option> <option value="/release/GABOR/Text-Format0.32/view/lib/Text/Format.pm" >0.32 (GABOR on 1998-01-21)</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/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.63/lib/Text/Format.pm" >0.63 (SHLOMIF on 2024-09-07)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.62/lib/Text/Format.pm" >0.62 (SHLOMIF on 2020-10-16)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.61/lib/Text/Format.pm" >0.61 (SHLOMIF on 2018-05-21)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.52/lib/Text/Format.pm" >0.52 (GABOR on 1998-03-29)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.52+NWrap0.11/lib/Text/Format.pm" >0.52+NWrap0.11 (GABOR on 1998-03-29)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.46/lib/Text/Format.pm" >0.46 (GABOR on 1998-02-18)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.46+NWrap0.11/lib/Text/Format.pm" >0.46+NWrap0.11 (GABOR on 1998-02-18)</option> <optgroup label="BackPAN">' <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.60/lib/Text/Format.pm" >0.60 (SHLOMIF on 2016-08-22)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.59/lib/Text/Format.pm" >0.59 (SHLOMIF on 2014-02-01)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.58/lib/Text/Format.pm" >0.58 (SHLOMIF on 2012-09-04)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.57/lib/Text/Format.pm" >0.57 (SHLOMIF on 2012-09-04)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.56/lib/Text/Format.pm" >0.56 (SHLOMIF on 2012-05-31)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.55/lib/Text/Format.pm" >0.55 (SHLOMIF on 2012-05-31)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.54/lib/Text/Format.pm" >0.54 (SHLOMIF on 2012-05-24)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/SHLOMIF/Text-Format-0.53/lib/Text/Format.pm" >0.53 (SHLOMIF on 2011-01-28)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.51/lib/Text/Format.pm" >0.51 (GABOR on 1998-03-15)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.51+NWrap0.11/lib/Text/Format.pm" >0.51+NWrap0.11 (GABOR on 1998-03-15)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.50/lib/Text/Format.pm" >0.50 (GABOR on 1998-02-21)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.50+NWrap0.11/lib/Text/Format.pm" >0.50+NWrap0.11 (GABOR on 1998-02-21)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.450/lib/Text/Format.pm" >0.450 (GABOR on 1998-02-18)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.450+NWrap0.11/lib/Text/Format.pm" >0.450+NWrap0.11 (GABOR on 1998-02-18)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.45+NWrap0.11/lib/Text/Format.pm" >0.45+NWrap0.11 (GABOR on 1998-02-18)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.45/lib/Text/Format.pm" >0.45 (GABOR on 1998-02-18)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.44/lib/Text/Format.pm" >0.44 (GABOR on 1998-02-12)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.44+NWrap0.11/lib/Text/Format.pm" >0.44+NWrap0.11 (GABOR on 1998-02-12)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.430/lib/Text/Format.pm" >0.430 (GABOR on 1998-02-11)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.43/lib/Text/Format.pm" >0.43 (GABOR on 1998-02-07)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.42/lib/Text/Format.pm" >0.42 (GABOR on 1998-02-07)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.41/lib/Text/Format.pm" >0.41 (GABOR on 1998-02-03)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.40/lib/Text/Format.pm" >0.40 (GABOR on 1998-01-30)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.33/lib/Text/Format.pm" >0.33 (GABOR on 1998-01-22)</option> <option value="/release/SHLOMIF/Text-Format-0.63/diff/GABOR/Text-Format0.32/lib/Text/Format.pm" >0.32 (GABOR on 1998-01-21)</option> </optgroup> </select> </li> <li> <ul class="dependencies"> <li class="nav-header">Dependencies</li> <li><a href="/pod/Carp" title="Carp" class="ellipsis">Carp</a></li> <li><a href="/pod/strict" title="strict" class="ellipsis">strict</a></li> <li><a href="/pod/warnings" title="warnings" class="ellipsis">warnings</a></li> <li> <hr> </li> <li> <a href="/module/Text::Format/requires">Reverse dependencies</a> </li> <li> <a href="http://deps.cpantesters.org/?module=Text%3A%3AFormat">CPAN Testers List</a> </li> <li> <a href="https://cpandeps.grinnz.com/?dist=Text-Format">Dependency graph</a> </li> </ul> </li> <li class="nav-header">Permalinks</li> <li> <a href="/release/SHLOMIF/Text-Format-0.63/view/lib/Text/Format.pm">This version</a> </li> <li> <a href="/pod/Text::Format">Latest version</a> </li> <li> <div class="plussers"> <div class="nav-header">++ed by:</div> <div> <a class="display-all" href="/author/KEEDI"><img src="https://www.gravatar.com/avatar/95f905a7a4ccc573c711e9d264c0fde8?d=identicon&s=20" title="KEEDI" alt="KEEDI"></a> <a class="display-all" href="/author/SSCAFFIDI"><img src="https://www.gravatar.com/avatar/2b2258ad3913c3d9a32123b905101a8b?d=identicon&s=20" title="SSCAFFIDI" alt="SSCAFFIDI"></a> </div> <!-- Display counts of plussers--> <div> <a href="/dist/Text-Format/plussers">2 PAUSE users</a> </div> </div> </li> <li> </li> </ul> </div> </nav> <div class="content-navigation"> <div class="breadcrumbs"> <span> <a data-keyboard-shortcut="g a" rel="author" href="/author/SHLOMIF" class="author-name">Shlomi Fish</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/SHLOMIF/Text-Format-0.63/view/lib/Text/Format.pm" >0.63 (SHLOMIF on 2024-09-07)</option> <option value="/release/SHLOMIF/Text-Format-0.62/view/lib/Text/Format.pm" >0.62 (SHLOMIF on 2020-10-16)</option> <option value="/release/SHLOMIF/Text-Format-0.61/view/lib/Text/Format.pm" >0.61 (SHLOMIF on 2018-05-21)</option> <option value="/release/GABOR/Text-Format0.52/view/lib/Text/Format.pm" >0.52 (GABOR on 1998-03-29)</option> <option value="/release/GABOR/Text-Format0.52+NWrap0.11/view/lib/Text/Format.pm" >0.52+NWrap0.11 (GABOR on 1998-03-29)</option> <option value="/release/GABOR/Text-Format0.46/view/lib/Text/Format.pm" >0.46 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.46+NWrap0.11/view/lib/Text/Format.pm" >0.46+NWrap0.11 (GABOR on 1998-02-18)</option> <optgroup label="BackPAN">' <option value="/release/SHLOMIF/Text-Format-0.60/view/lib/Text/Format.pm" >0.60 (SHLOMIF on 2016-08-22)</option> <option value="/release/SHLOMIF/Text-Format-0.59/view/lib/Text/Format.pm" >0.59 (SHLOMIF on 2014-02-01)</option> <option value="/release/SHLOMIF/Text-Format-0.58/view/lib/Text/Format.pm" >0.58 (SHLOMIF on 2012-09-04)</option> <option value="/release/SHLOMIF/Text-Format-0.57/view/lib/Text/Format.pm" >0.57 (SHLOMIF on 2012-09-04)</option> <option value="/release/SHLOMIF/Text-Format-0.56/view/lib/Text/Format.pm" >0.56 (SHLOMIF on 2012-05-31)</option> <option value="/release/SHLOMIF/Text-Format-0.55/view/lib/Text/Format.pm" >0.55 (SHLOMIF on 2012-05-31)</option> <option value="/release/SHLOMIF/Text-Format-0.54/view/lib/Text/Format.pm" >0.54 (SHLOMIF on 2012-05-24)</option> <option value="/release/SHLOMIF/Text-Format-0.53/view/lib/Text/Format.pm" >0.53 (SHLOMIF on 2011-01-28)</option> <option value="/release/GABOR/Text-Format0.51/view/lib/Text/Format.pm" >0.51 (GABOR on 1998-03-15)</option> <option value="/release/GABOR/Text-Format0.51+NWrap0.11/view/lib/Text/Format.pm" >0.51+NWrap0.11 (GABOR on 1998-03-15)</option> <option value="/release/GABOR/Text-Format0.50/view/lib/Text/Format.pm" >0.50 (GABOR on 1998-02-21)</option> <option value="/release/GABOR/Text-Format0.50+NWrap0.11/view/lib/Text/Format.pm" >0.50+NWrap0.11 (GABOR on 1998-02-21)</option> <option value="/release/GABOR/Text-Format0.450/view/lib/Text/Format.pm" >0.450 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.450+NWrap0.11/view/lib/Text/Format.pm" >0.450+NWrap0.11 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.45+NWrap0.11/view/lib/Text/Format.pm" >0.45+NWrap0.11 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.45/view/lib/Text/Format.pm" >0.45 (GABOR on 1998-02-18)</option> <option value="/release/GABOR/Text-Format0.44/view/lib/Text/Format.pm" >0.44 (GABOR on 1998-02-12)</option> <option value="/release/GABOR/Text-Format0.44+NWrap0.11/view/lib/Text/Format.pm" >0.44+NWrap0.11 (GABOR on 1998-02-12)</option> <option value="/release/GABOR/Text-Format0.430/view/lib/Text/Format.pm" >0.430 (GABOR on 1998-02-11)</option> <option value="/release/GABOR/Text-Format0.43/view/lib/Text/Format.pm" >0.43 (GABOR on 1998-02-07)</option> <option value="/release/GABOR/Text-Format0.42/view/lib/Text/Format.pm" >0.42 (GABOR on 1998-02-07)</option> <option value="/release/GABOR/Text-Format0.41/view/lib/Text/Format.pm" >0.41 (GABOR on 1998-02-03)</option> <option value="/release/GABOR/Text-Format0.40/view/lib/Text/Format.pm" >0.40 (GABOR on 1998-01-30)</option> <option value="/release/GABOR/Text-Format0.33/view/lib/Text/Format.pm" >0.33 (GABOR on 1998-01-22)</option> <option value="/release/GABOR/Text-Format0.32/view/lib/Text/Format.pm" >0.32 (GABOR on 1998-01-21)</option> </optgroup> </select> <a data-keyboard-shortcut="g d" class="release-name" href="/dist/Text-Format">Text-Format-0.63</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 two • 7 direct dependents • 11 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="#e4e2e2" /> <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="Text-Format-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="Text-Format-0.63"> <input type="hidden" name="author" value="SHLOMIF"> <input type="hidden" name="distribution" value="Text-Format"> <button type="submit" class="favorite highlight"><span>2</span> ++</button> </form> </div> <div class="show-logged-out"> <button class="fav-not-logged-in favorite highlight"><span>2</span> ++</button> </div> / <span>Text::Format</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="#EXAMPLE">EXAMPLE</a></li> <li><a href="#BUGS">BUGS</a></li> <li><a href="#LICENSE">LICENSE</a></li> <li><a href="#AUTHOR">AUTHOR</a></li> <li><a href="#ACKNOWLEDGMENTS">ACKNOWLEDGMENTS</a></li> <li><a href="#TODO">TODO</a></li> <li><a href="#SUPPORT">SUPPORT</a> <ul> <li><a href="#Websites">Websites</a></li> <li><a href="#Bugs-%2F-Feature-Requests">Bugs / Feature Requests</a></li> <li><a href="#Source-Code">Source Code</a></li> </ul> </li> <li><a href="#AUTHOR1">AUTHOR</a></li> <li><a href="#BUGS1">BUGS</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><b>Text::Format</b> - Various subroutines to format text.</p> <h1 id="VERSION">VERSION</h1> <p>version 0.63</p> <h1 id="SYNOPSIS">SYNOPSIS</h1> <pre><code>use Text::Format; my $text = Text::Format->new ( { text => [], # all columns => 72, # format, paragraphs, center leftMargin => 0, # format, paragraphs, center rightMargin => 0, # format, paragraphs, center firstIndent => 4, # format, paragraphs bodyIndent => 0, # format, paragraphs rightFill => 0, # format, paragraphs rightAlign => 0, # format, paragraphs justify => 0, # format, paragraphs extraSpace => 0, # format, paragraphs abbrevs => {}, # format, paragraphs hangingIndent => 0, # format, paragraphs hangingText => [], # format, paragraphs noBreak => 0, # format, paragraphs noBreakRegex => {}, # format, paragraphs tabstop => 8, # expand, unexpand, center } ); # these are the default values my %abbr = (foo => 1, bar => 1); $text->abbrevs(\%abbr); $text->abbrevs(); $text->abbrevs({foo => 1,bar => 1}); $text->abbrevs(qw/foo bar/); $text->text(\@text); $text->columns(132); $text->tabstop(4); $text->extraSpace(1); $text->firstIndent(8); $text->bodyIndent(4); $text->config({tabstop => 4,firstIndent => 0}); $text->rightFill(0); $text->rightAlign(0);</code></pre> <h1 id="DESCRIPTION">DESCRIPTION</h1> <p>The <b>format</b> routine will format under all circumstances even if the width isn't enough to contain the longest words. <i>Text::Wrap</i> will die under these circumstances, although I am told this is fixed. If columns is set to a small number and words are longer than that and the leading 'whitespace' than there will be a single word on each line. This will let you make a simple word list which could be indented or right aligned. There is a chance for croaking if you try to subvert the module. If you don't pass in text then the internal text is worked on, though not modified.</p> <p><i>Text::Format</i> is meant for more powerful text formatting than what <i>Text::Wrap</i> allows. I also have a module called <i>Text::NWrap</i> that is meant as a direct replacement for <i>Text::Wrap</i>. <i>Text::NWrap</i> requires <i>Text::Format</i> since it uses <i>Text::Format->format</i> to do the actual wrapping but gives you the interface of <i>Text::Wrap</i>.</p> <p>General setup should be explained with the below graph.</p> <pre><code> columns <------------------------------------------------------------> <----------><------><---------------------------><-----------> leftMargin indent text is formatted into here rightMargin</code></pre> <p>indent is firstIndent or bodyIndent depending on where we are in the paragraph.</p> <dl> <dt id="format-@ARRAY-||-\@ARRAY-||-[<FILEHANDLE>]-||-NOTHING"><a id="format"></a><a id="format-ARRAY-ARRAY-FILEHANDLE-NOTHING"></a><b>format</b> @ARRAY || \@ARRAY || [<FILEHANDLE>] || NOTHING</dt> <dd> <p>Allows one to do some advanced formatting of text into a paragraph, with indent for first line and body set separately. Can specify total width of text, right fill with spaces or right align or justify (align to both margins), right margin and left margin, non-breaking space, two spaces at end of sentence, hanging indents (tagged paragraphs). Strips all leading and trailing whitespace before proceeding. Text is first split into words and then reassembled. If no text is passed in then the internal text in the object is formatted.</p> </dd> <dt id="paragraphs-@ARRAY-||-\@ARRAY-||-[<FILEHANDLE>]-||-NOTHING"><a id="paragraphs"></a><a id="paragraphs-ARRAY-ARRAY-FILEHANDLE-NOTHING"></a><b>paragraphs</b> @ARRAY || \@ARRAY || [<FILEHANDLE>] || NOTHING</dt> <dd> <p>Considers each element of text as a paragraph and if the indents are the same for first line and the body then the paragraphs are separated by a single empty line otherwise they follow one under the other. If hanging indent is set then a single empty line will separate each paragraph as well. Calls <i>format</i> to do the actual formatting. If no text is passed in then the internal text in the object is formatted, though not changed.</p> </dd> <dt id="center-@ARRAY-||-NOTHING"><a id="center"></a><a id="center-ARRAY-NOTHING"></a><b>center</b> @ARRAY || NOTHING</dt> <dd> <p>Centers a list of strings in @ARRAY or internal text. Empty lines appear as, you guessed it, empty lines. Center strips all leading and trailing whitespace before proceeding. Left margin and right margin can be set. If no text is passed in then the internal text in the object is formatted.</p> </dd> <dt id="expand-@ARRAY-||-NOTHING"><a id="expand"></a><a id="expand-ARRAY-NOTHING"></a><b>expand</b> @ARRAY || NOTHING</dt> <dd> <p>Expand tabs in the list of text to tabstop number of spaces in @ARRAY or internal text. Doesn't modify the internal text just passes back the modified text. If no text is passed in then the internal text in the object is formatted.</p> </dd> <dt id="unexpand-@ARRAY-||-NOTHING"><a id="unexpand"></a><a id="unexpand-ARRAY-NOTHING"></a><b>unexpand</b> @ARRAY || NOTHING</dt> <dd> <p>Tabstop number of spaces are turned into tabs in @ARRAY or internal text. Doesn't modify the internal text just passes back the modified text. If no text is passed in then the internal text in the object is formatted.</p> </dd> <dt id="new-\%HASH-||-NOTHING"><a id="new"></a><a id="new-HASH-NOTHING"></a><b>new</b> \%HASH || NOTHING</dt> <dd> <p>Instantiates the object. If you pass a reference to a hash, or an anonymous hash then it is used in setting attributes.</p> </dd> <dt id="config-\%HASH"><a id="config"></a><a id="config-HASH"></a><b>config</b> \%HASH</dt> <dd> <p>Allows the configuration of all object attributes at once. Returns the object prior to configuration. You can use it to make a clone of your object before you change attributes.</p> </dd> <dt id="columns-NUMBER-||-NOTHING"><a id="columns"></a><a id="columns-NUMBER-NOTHING"></a><b>columns</b> NUMBER || NOTHING</dt> <dd> <p>Set width of text or retrieve width. This is total width and includes indentation and the right and left margins.</p> </dd> <dt id="tabstop-NUMBER-||-NOTHING"><a id="tabstop"></a><a id="tabstop-NUMBER-NOTHING"></a><b>tabstop</b> NUMBER || NOTHING</dt> <dd> <p>Set tabstop size or retrieve tabstop size, only used by expand, unexpand and center.</p> </dd> <dt id="firstIndent-NUMBER-||-NOTHING"><a id="firstIndent"></a><a id="firstIndent-NUMBER-NOTHING"></a><b>firstIndent</b> NUMBER || NOTHING</dt> <dd> <p>Set or get indent for the first line of paragraph. This is the number of spaces to indent.</p> </dd> <dt id="bodyIndent-NUMBER-||-NOTHING"><a id="bodyIndent"></a><a id="bodyIndent-NUMBER-NOTHING"></a><b>bodyIndent</b> NUMBER || NOTHING</dt> <dd> <p>Set or get indent for the body of paragraph. This is the number of spaces to indent.</p> </dd> <dt id="leftMargin-NUMBER-||-NOTHING"><a id="leftMargin"></a><a id="leftMargin-NUMBER-NOTHING"></a><b>leftMargin</b> NUMBER || NOTHING</dt> <dd> <p>Set or get width of left margin. This is the number of spaces used for the margin.</p> </dd> <dt id="rightMargin-NUMBER-||-NOTHING"><a id="rightMargin"></a><a id="rightMargin-NUMBER-NOTHING"></a><b>rightMargin</b> NUMBER || NOTHING</dt> <dd> <p>Set or get width of right margin. This is the number of spaces used for the margin.</p> </dd> <dt id="rightFill-0-||-1-||-NOTHING"><a id="rightFill"></a><a id="rightFill-0-1-NOTHING"></a><b>rightFill</b> 0 || 1 || NOTHING</dt> <dd> <p>Set right fill or retrieve its value. The filling is done with spaces. Keep in mind that if <i>rightAlign</i> is also set then both <i>rightFill</i> and <i>rightAlign</i> are ignored.</p> </dd> <dt id="rightAlign-0-||-1-||-NOTHING"><a id="rightAlign"></a><a id="rightAlign-0-1-NOTHING"></a><b>rightAlign</b> 0 || 1 || NOTHING</dt> <dd> <p>Set right align or retrieve its value. Text is aligned with the right side of the margin. Keep in mind that if <i>rightFill</i> is also set then both <i>rightFill</i> and <i>rightAlign</i> are ignored.</p> </dd> <dt id="justify-0-||-1-||-NOTHING"><a id="justify"></a><a id="justify-0-1-NOTHING"></a><b>justify</b> 0 || 1 || NOTHING</dt> <dd> <p>Set justify or retrieve its value. Text is aligned with both margins, adding extra spaces as necessary to align text with left and right margins. Keep in mind that if either of <i>rightAlign</i> or <i>rightFill</i> are set then <i>justify</i> is ignored, even if both are set in which case they are all ignored.</p> </dd> <dt id="text-\@ARRAY-||-NOTHING"><a id="text"></a><a id="text-ARRAY-NOTHING"></a><b>text</b> \@ARRAY || NOTHING</dt> <dd> <p>Pass in a reference to your text, or an anonymous array of text that you want the routines to manipulate. Returns the text held in the object.</p> </dd> <dt id="hangingIndent-0-||-1-||-NOTHING"><a id="hangingIndent"></a><a id="hangingIndent-0-1-NOTHING"></a><b>hangingIndent</b> 0 || 1 || NOTHING</dt> <dd> <p>Use hanging indents in front of a paragraph, returns current value of attribute. This is also called a tagged paragraph.</p> </dd> <dt id="hangingText-\@ARRAY-||-NOTHING"><a id="hangingText"></a><a id="hangingText-ARRAY-NOTHING"></a><b>hangingText</b> \@ARRAY || NOTHING</dt> <dd> <p>The text that will be displayed in front of each paragraph, if you call <i>format</i> then only the first element is used, if you call <i>paragraphs</i> then <i>paragraphs</i> cycles through all of them. If you have more paragraphs than elements in your array than the remainder of the paragraphs will not have a hanging indented text. Pass a reference to your array. This is also called a tagged paragraph.</p> </dd> <dt id="noBreak-0-||-1-||-NOTHING"><a id="noBreak"></a><a id="noBreak-0-1-NOTHING"></a><b>noBreak</b> 0 || 1 || NOTHING</dt> <dd> <p>Set whether you want to use the non-breaking space feature (see <b>noBreakRegex</b> below).</p> </dd> <dt id="noBreakRegex-\%HASH-||-NOTHING"><a id="noBreakRegex"></a><a id="noBreakRegex-HASH-NOTHING"></a><b>noBreakRegex</b> \%HASH || NOTHING</dt> <dd> <p>Pass in a reference to a hash that would hold the regexes on which not to break. In order for this to happen, it requires <b>noBreak</b> to be set to <b>true</b> - see above. Without any arguments, it returns the hash. E.g:</p> <pre><code>{'^Mrs?\.$' => '^\S+$','^\S+$' => '^(?:S|J)r\.$'}</code></pre> <p>don't break names such as Mr. Jones, Mrs. Jones, Jones Jr.</p> <p>The breaking algorithm is simple. If there should not be a break at the current end of sentence, then a backtrack is done till there are two words on which breaking is allowed. If no two such words are found then the end of sentence is broken anyhow. If there is a single word on current line then no backtrack is done and the word is stuck on the end. This is so you can make a list of names for example.</p> <p><b>Note</b>: this feature requires <b>noBreak</b> to be set to true.</p> </dd> <dt id="extraSpace-0-||-1-||-NOTHING"><a id="extraSpace"></a><a id="extraSpace-0-1-NOTHING"></a><b>extraSpace</b> 0 || 1 || NOTHING</dt> <dd> <p>Add extra space after end of sentence, normally <i>format</i> would add 1 space after end of sentence, if this is set to 1 then 2 spaces are used. Abbreviations are not followed by two spaces. There are a few internal abbreviations and you can add your own to the object with <i>abbrevs</i></p> </dd> <dt id="abbrevs-\%HASH-||-@ARRAY-||-NOTHING"><a id="abbrevs"></a><a id="abbrevs-HASH-ARRAY-NOTHING"></a><b>abbrevs</b> \%HASH || @ARRAY || NOTHING</dt> <dd> <p>Add to the current abbreviations, takes a reference to your hash or an array of abbreviations, if called a second time the original reference is removed and replaced by the new one. Returns the current INTERNAL abbreviations.</p> </dd> </dl> <h1 id="EXAMPLE">EXAMPLE</h1> <pre><code>use Text::Format; my $text = Text::Format->new; $text->rightFill(1); $text->columns(65); $text->tabstop(4); print $text->format("a line to format to an indented regular paragraph using 65 character wide display"); print $text->paragraphs("paragraph one","paragraph two"); print $text->center("hello world","nifty line 2"); print $text->expand("\t\thello world\n","hmm,\twell\n"); print $text->unexpand(" hello world\n"," hmm"); $text->config({columns => 132, tabstop => 4}); $text = Text::Format->new(); print $text->format(@text); print $text->paragraphs(@text); print $text->center(@text); print $text->format([<FILEHANDLE>]); print $text->format([$fh->getlines()]); print $text->paragraphs([<FILEHANDLE>]); print $text->expand(@text); print $text->unexpand(@text); $text = Text::Format->new ({tabstop => 4,bodyIndent => 4,text => \@text}); print $text->format(); print $text->paragraphs(); print $text->center(); print $text->expand(); print $text->unexpand(); print Text::Format->new({columns => 95})->format(@text);</code></pre> <h1 id="BUGS">BUGS</h1> <p>Line length can exceed the number of specified columns if columns is set to a small number and long words plus leading whitespace exceed the specified column length. Actually I see this as a feature since it can be used to make up a nice word list.</p> <h1 id="LICENSE">LICENSE</h1> <p>Copyright (c) 1998 Gabor Egressy. All rights reserved.</p> <p>This program is free software; you can redistribute and/or modify it under the same terms as Perl itself.</p> <h1 id="AUTHOR">AUTHOR</h1> <p>Gabor Egressy <b>gabor@vmunix.com</b></p> <p>Copyright (c) 1998 Gabor Egressy. All rights reserved. All wrongs reversed. This program is free software; you can redistribute and/or modify it under the same terms as Perl itself.</p> <p>Adopted and modified by Shlomi Fish, <a href="http://www.shlomifish.org/">http://www.shlomifish.org/</a> - all rights disclaimed.</p> <h1 id="ACKNOWLEDGMENTS">ACKNOWLEDGMENTS</h1> <p><b>Tom Phoenix</b></p> <p>Found a bug with code for two spaces at the end of the sentence and provided a code fragment for a better solution. Also some preliminary suggestions on the design.</p> <p><b>Brad Appleton</b></p> <p>Suggestion and explanation of hanging indents, suggestion for non-breaking whitespace, general suggestions with regard to interface design.</p> <p><b>Byron Brummer</b></p> <p>Suggestion for better interface design and object design, code for better implementation of getting abbreviations.</p> <p><b>H. Merijn Brand</b></p> <p>Suggestion for a justify feature and original code for doing the justification. I changed the code to take into account the extra space at end of sentence feature.</p> <p><b>Anne Wainwright</b></p> <p>Inspired a documentation clarification about <b>noBreak</b> required by <b>noBreakRegex</b> , thanks to a report with a problem.</p> <h1 id="TODO">TODO</h1> <h1 id="SUPPORT">SUPPORT</h1> <h2 id="Websites">Websites</h2> <p>The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.</p> <ul> <li><p>MetaCPAN</p> <p>A modern, open-source CPAN search engine, useful to view POD in HTML format.</p> <p><a href="https://metacpan.org/release/Text-Format">https://metacpan.org/release/Text-Format</a></p> </li> <li><p>RT: CPAN's Bug Tracker</p> <p>The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.</p> <p><a href="https://rt.cpan.org/Public/Dist/Display.html?Name=Text-Format">https://rt.cpan.org/Public/Dist/Display.html?Name=Text-Format</a></p> </li> <li><p>CPANTS</p> <p>The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.</p> <p><a href="http://cpants.cpanauthors.org/dist/Text-Format">http://cpants.cpanauthors.org/dist/Text-Format</a></p> </li> <li><p>CPAN Testers</p> <p>The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.</p> <p><a href="http://www.cpantesters.org/distro/T/Text-Format">http://www.cpantesters.org/distro/T/Text-Format</a></p> </li> <li><p>CPAN Testers Matrix</p> <p>The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.</p> <p><a href="http://matrix.cpantesters.org/?dist=Text-Format">http://matrix.cpantesters.org/?dist=Text-Format</a></p> </li> <li><p>CPAN Testers Dependencies</p> <p>The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.</p> <p><a href="http://deps.cpantesters.org/?module=Text::Format">http://deps.cpantesters.org/?module=Text::Format</a></p> </li> </ul> <h2 id="Bugs-/-Feature-Requests"><a id="Bugs"></a><a id="Bugs-Feature-Requests"></a>Bugs / Feature Requests</h2> <p>Please report any bugs or feature requests by email to <code>bug-text-format at rt.cpan.org</code>, or through the web interface at <a href="https://rt.cpan.org/Public/Bug/Report.html?Queue=Text-Format">https://rt.cpan.org/Public/Bug/Report.html?Queue=Text-Format</a>. You will be automatically notified of any progress on the request by the system.</p> <h2 id="Source-Code"><a id="Source"></a>Source Code</h2> <p>The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)</p> <p><a href="https://github.com/shlomif/perl-Module-Format">https://github.com/shlomif/perl-Module-Format</a></p> <pre><code>git clone https://github.com/shlomif/perl-Module-Format</code></pre> <h1 id="AUTHOR1">AUTHOR</h1> <p>Shlomi Fish <shlomif@cpan.org></p> <h1 id="BUGS1">BUGS</h1> <p>Please report any bugs or feature requests on the bugtracker website <a href="https://github.com/shlomif/perl-Module-Format/issues">https://github.com/shlomif/perl-Module-Format/issues</a></p> <p>When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.</p> <h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1> <p>This software is copyright (c) 2024 by Gabor Egressy.</p> <p>This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system 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">×</button> <h4 class="modal-title">Module Install Instructions</h4> </div> <div class="modal-body"> <p>To install Text::Format, 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 Text::Format</code></pre> <p><a href="/pod/CPAN">CPAN shell</a></p> <pre><code>perl -MCPAN -e shell install Text::Format</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>