Imported Upstream version 5.8.8

parents
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>AnyDBM_File - perldoc.perl.org</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en-gb" />
<link href="css.css" rel="stylesheet" rev="stylesheet" type="text/css" media="screen" />
</head>
<script language="JavaScript" type="text/javascript" src="label.js"></script>
<script language="JavaScript">
pageDepth = 0;
setPath();
</script>
<body onLoad="showToolbars();loadLabels()">
<div id="pageHeader">
<div id="pageHeaderLogo">
<img src="onion.gif">
</div>
<div id="pageHeaderText">
<a href="http://perldoc.perl.org">perldoc.perl.org</a>
</div>
</div>
<div id="pageBody">
<div id="left">
<div id="leftContent">
<div id="leftClose">
<a href="#" onClick="closeLeft()" title="Hide navigation" onmouseover="leftCloseIcon.src='close_purple.gif';" onmouseout="leftCloseIcon.src='close_blue.gif';"><img src="close_blue.gif" name="leftCloseIcon" id="leftCloseIcon" border=0></a>
</div>
<h1>Manual:</h1>
<ul>
<li><a href="index-overview.html">Overview</a></li>
<li><a href="index-tutorials.html">Tutorials</a></li>
<li><a href="index-faq.html">FAQs</a></li>
<li><a href="index-history.html">History / Changes</a></li>
<li><a href="index-licence.html">Licence</a></li>
</ul>
<h2>Reference:</h2>
<ul>
<li><a href="index-language.html">Language</a></li>
<li><a href="index-functions.html">Functions</a></li>
<li><a href="perlop.html">Operators</a></li>
<li><a href="perlvar.html">Special variables</a></li>
<li><a href="index-pragmas.html">Pragmas</a></li>
<li><a href="index-modules-A.html">Core modules</a></li>
<li><a href="index-utilities.html">Utilities</a></li>
<li><a href="index-internals.html">Internals</a></li>
<li><a href="index-platforms.html">Platform specific</a></li>
</ul>
<h2>Links:</h2>
<ul>
<li><a href="http://search.cpan.org">CPAN</a></li>
<li><a href="http://www.perl.com">Perl.com</a></li>
<li><a href="http://www.perl.org">Perl.org</a></li>
<li><a href="http://www.pm.org">Perl Mongers</a></li>
<li><a href="http://www.perlmonks.org">Perl Monks</a></li>
<li><a href="http://planet.perl.org">Planet Perl</a></li>
<li><a href="http://use.perl.org">Use Perl</a></li>
</ul>
<h2>Contact:</h2>
<ul>
<li>Site maintained by<br><a href="http://perl.jonallen.info">Jon Allen</a>
(<a href="http://perl.jonallen.info">JJ</a>)</li>
<li class="spaced">Last updated on<br>23 April 2006</li>
<li class="spaced">See the <a href="http://perl.jonallen.info/projects/perldoc">project page</a> for
more details</li>
</ul>
</div>
</div>
<div id="center">
<div id="centerContent">
<div id="contentHeader">
<div id="contentHeaderLeft"><a href="#" onClick="showLeft()">Show navigation</a></div>
<div id="contentHeaderCentre">-- Perl 5.8.8 documentation --</div>
<div id="contentHeaderRight"><a href="#" onClick="showRight()">Show toolbar</a></div>
</div>
<div id="breadCrumbs"><a href="index.html">Home</a> &gt; <a href="index-modules-A.html">Core modules</a> &gt; <a href="index-modules-A.html">A</a> &gt; AnyDBM_File</div>
<script language="JavaScript">fromSearch();</script>
<div id="contentBody"><div class="title_container"><div class="page_title">AnyDBM_File</div></div><ul><li><a href="#NAME">NAME</a><li><a href="#SYNOPSIS">SYNOPSIS</a><li><a href="#DESCRIPTION">DESCRIPTION</a><ul><li><a href="#DBM-Comparisons">DBM Comparisons</a></ul><li><a href="#SEE-ALSO">SEE ALSO</a></ul><a name="NAME"></a><h1>NAME</h1>
<p>AnyDBM_File - provide framework for multiple DBMs</p>
<p>NDBM_File, DB_File, GDBM_File, SDBM_File, ODBM_File - various DBM implementations</p>
<a name="SYNOPSIS"></a><h1>SYNOPSIS</h1>
<pre class="verbatim"> <a class="l_k" href="functions/use.html">use</a> <a class="l_w" href="AnyDBM_File.html">AnyDBM_File</a><span class="sc">;</span></pre>
<a name="DESCRIPTION"></a><h1>DESCRIPTION</h1>
<p>This module is a "pure virtual base class"--it has nothing of its own.
It's just there to inherit from one of the various DBM packages. It
prefers ndbm for compatibility reasons with Perl 4, then Berkeley DB (See
<a href="DB_File.html">DB_File</a>), GDBM, SDBM (which is always there--it comes with Perl), and
finally ODBM. This way old programs that used to use NDBM via dbmopen()
can still do so, but new ones can reorder @ISA:</p>
<pre class="verbatim"> BEGIN <span class="s">{</span> <span class="i">@AnyDBM_File::ISA</span> = <span class="q">qw(DB_File GDBM_File NDBM_File)</span> <span class="s">}</span>
<a class="l_k" href="functions/use.html">use</a> <a class="l_w" href="AnyDBM_File.html">AnyDBM_File</a><span class="sc">;</span></pre>
<p>Having multiple DBM implementations makes it trivial to copy database formats:</p>
<pre class="verbatim"> <a class="l_k" href="functions/use.html">use</a> <a class="l_w" href="POSIX.html">POSIX</a><span class="sc">;</span> <a class="l_k" href="functions/use.html">use</a> <a class="l_w" href="NDBM_File.html">NDBM_File</a><span class="sc">;</span> <a class="l_k" href="functions/use.html">use</a> <a class="l_w" href="DB_File.html">DB_File</a><span class="sc">;</span>
<a class="l_k" href="functions/tie.html">tie</a> <span class="i">%newhash</span><span class="cm">,</span> <span class="q">&#39;DB_File&#39;</span><span class="cm">,</span> <span class="i">$new_filename</span><span class="cm">,</span> O_CREAT|O_RDWR<span class="sc">;</span>
<a class="l_k" href="functions/tie.html">tie</a> <span class="i">%oldhash</span><span class="cm">,</span> <span class="q">&#39;NDBM_File&#39;</span><span class="cm">,</span> <span class="i">$old_filename</span><span class="cm">,</span> <span class="n">1</span><span class="cm">,</span> <span class="n">0</span><span class="sc">;</span>
<span class="i">%newhash</span> = <span class="i">%oldhash</span><span class="sc">;</span></pre>
<a name="DBM-Comparisons"></a><h2>DBM Comparisons</h2>
<p>Here's a partial table of features the different packages offer:</p>
<pre class="verbatim"> odbm ndbm sdbm gdbm bsd-db
---- ---- ---- ---- ------
Linkage comes w/ perl yes yes yes yes yes
Src comes w/ perl no no yes no no
Comes w/ many unix os yes yes[0] no no no
Builds ok on !unix ? ? yes yes ?
Code Size ? ? small big big
Database Size ? ? small big? ok[1]
Speed ? ? slow ok fast
FTPable no no yes yes yes
Easy to build N/A N/A yes yes ok[2]
Size limits 1k 4k 1k[3] none none
Byte-order independent no no no no yes
Licensing restrictions ? ? no yes no</pre><ul>
<li><a name="%5b0%5d"></a><b>[0] </b>
<p>on mixed universe machines, may be in the bsd compat library,
which is often shunned.</p>
</li>
<li><a name="%5b1%5d"></a><b>[1] </b>
<p>Can be trimmed if you compile for one access method.</p>
</li>
<li><a name="%5b2%5d"></a><b>[2] </b>
<p>See <a href="DB_File.html">DB_File</a>.
Requires symbolic links. </p>
</li>
<li><a name="%5b3%5d"></a><b>[3] </b>
<p>By default, but can be redefined.</p>
</li>
</ul>
<a name="SEE-ALSO"></a><h1>SEE ALSO</h1>
<p>dbm(3), ndbm(3), DB_File(3), <a href="perldbmfilter.html">perldbmfilter</a></p>
</div>
<div id="contentFooter"><a href="http://www.perl.org"><img src="perlpowered.png" border=0></a></div>
</div>
</div>
<div id="right">
<div id="rightContent">
<div id="leftClose">
<a href="#" onClick="closeRight()" title="Hide toolbar" onmouseover="rightCloseIcon.src='close_purple.gif';" onmouseout="rightCloseIcon.src='close_blue.gif';"><img src="close_blue.gif" name="rightCloseIcon" id="rightCloseIcon" border=0></a>
</div>
<h1>Search:</h1>
<p>
<form action="search.html" name="perldoc_search">
<input type="text" name="q" size="10" class="grey"><br>
<!--<select name="r"><option value="1" selected>Go to top result<option value="0">Show results list</select>-->
</form>
</p>
<h2>Labels:</h2>
<p>
<a href="#" onClick="addLabel('AnyDBM_File','AnyDBM_File.html')">Add this page</a>
</p>
<div class="labels" id="labels">
</div>
</div>
</div>
</div>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>B::Asmdata - perldoc.perl.org</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en-gb" />
<link href="../css.css" rel="stylesheet" rev="stylesheet" type="text/css" media="screen" />
</head>
<script language="JavaScript" type="text/javascript" src="../label.js"></script>
<script language="JavaScript">
pageDepth = 1;
setPath();
</script>
<body onLoad="showToolbars();loadLabels()">
<div id="pageHeader">
<div id="pageHeaderLogo">
<img src="../onion.gif">
</div>
<div id="pageHeaderText">
<a href="http://perldoc.perl.org">perldoc.perl.org</a>
</div>
</div>
<div id="pageBody">
<div id="left">
<div id="leftContent">
<div id="leftClose">
<a href="#" onClick="closeLeft()" title="Hide navigation" onmouseover="leftCloseIcon.src='../close_purple.gif';" onmouseout="leftCloseIcon.src='../close_blue.gif';"><img src="../close_blue.gif" name="leftCloseIcon" id="leftCloseIcon" border=0></a>
</div>
<h1>Manual:</h1>
<ul>
<li><a href="../index-overview.html">Overview</a></li>
<li><a href="../index-tutorials.html">Tutorials</a></li>
<li><a href="../index-faq.html">FAQs</a></li>
<li><a href="../index-history.html">History / Changes</a></li>
<li><a href="../index-licence.html">Licence</a></li>
</ul>
<h2>Reference:</h2>
<ul>
<li><a href="../index-language.html">Language</a></li>
<li><a href="../index-functions.html">Functions</a></li>
<li><a href="../perlop.html">Operators</a></li>
<li><a href="../perlvar.html">Special variables</a></li>
<li><a href="../index-pragmas.html">Pragmas</a></li>
<li><a href="../index-modules-A.html">Core modules</a></li>
<li><a href="../index-utilities.html">Utilities</a></li>
<li><a href="../index-internals.html">Internals</a></li>
<li><a href="../index-platforms.html">Platform specific</a></li>
</ul>
<h2>Links:</h2>
<ul>
<li><a href="http://search.cpan.org">CPAN</a></li>
<li><a href="http://www.perl.com">Perl.com</a></li>
<li><a href="http://www.perl.org">Perl.org</a></li>
<li><a href="http://www.pm.org">Perl Mongers</a></li>
<li><a href="http://www.perlmonks.org">Perl Monks</a></li>
<li><a href="http://planet.perl.org">Planet Perl</a></li>
<li><a href="http://use.perl.org">Use Perl</a></li>
</ul>
<h2>Contact:</h2>
<ul>
<li>Site maintained by<br><a href="http://perl.jonallen.info">Jon Allen</a>
(<a href="http://perl.jonallen.info">JJ</a>)</li>
<li class="spaced">Last updated on<br>23 April 2006</li>
<li class="spaced">See the <a href="http://perl.jonallen.info/projects/perldoc">project page</a> for
more details</li>
</ul>
</div>
</div>
<div id="center">
<div id="centerContent">
<div id="contentHeader">
<div id="contentHeaderLeft"><a href="#" onClick="showLeft()">Show navigation</a></div>
<div id="contentHeaderCentre">-- Perl 5.8.8 documentation --</div>
<div id="contentHeaderRight"><a href="#" onClick="showRight()">Show toolbar</a></div>
</div>
<div id="breadCrumbs"><a href="../index.html">Home</a> &gt; <a href="../index-modules-A.html">Core modules</a> &gt; <a href="../index-modules-B.html">B</a> &gt; B::Asmdata</div>
<script language="JavaScript">fromSearch();</script>
<div id="contentBody"><div class="title_container"><div class="page_title">B::Asmdata</div></div><ul><li><a href="#NAME">NAME</a><li><a href="#SYNOPSIS">SYNOPSIS</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#AUTHOR">AUTHOR</a></ul><a name="NAME"></a><h1>NAME</h1>
<p>B::Asmdata - Autogenerated data about Perl ops, used to generate bytecode</p>
<a name="SYNOPSIS"></a><h1>SYNOPSIS</h1>
<pre class="verbatim"> <a class="l_k" href="../functions/use.html">use</a> <a class="l_w" href="../B/Asmdata.html">B::Asmdata</a> <span class="q">qw(%insn_data @insn_name @optype @specialsv_name)</span><span class="sc">;</span></pre>
<a name="DESCRIPTION"></a><h1>DESCRIPTION</h1>
<p>Provides information about Perl ops in order to generate bytecode via
a bunch of exported variables. Its mostly used by B::Assembler and
B::Disassembler.</p>
<ul>
<li><a name="%25insn_data"></a><b>%insn_data</b>
<pre class="verbatim"> <a class="l_k" href="../functions/my.html">my</a><span class="s">(</span><span class="i">$bytecode_num</span><span class="cm">,</span> <span class="i">$put_sub</span><span class="cm">,</span> <span class="i">$get_meth</span><span class="s">)</span> = <span class="i">@$insn_data</span>{<span class="i">$op_name</span>}<span class="sc">;</span></pre>
<p>For a given $op_name (for example, 'cop_label', 'sv_flags', etc...)
you get an array ref containing the bytecode number of the op, a
reference to the subroutine used to 'PUT', and the name of the method
used to 'GET'.</p>
</li>
<li><a name="%40insn_name"></a><b>@insn_name</b>
<pre class="verbatim"> <a class="l_k" href="../functions/my.html">my</a> <span class="i">$op_name</span> = <span class="i">$insn_name</span>[<span class="i">$bytecode_num</span>]<span class="sc">;</span></pre>
<p>A simple mapping of the bytecode number to the name of the op.
Suitable for using with %insn_data like so:</p>
<pre class="verbatim"> <a class="l_k" href="../functions/my.html">my</a> <span class="i">$op_info</span> = <span class="i">$insn_data</span>{<span class="i">$insn_name</span>[<span class="i">$bytecode_num</span>]}<span class="sc">;</span></pre>
</li>
<li><a name="%40optype"></a><b>@optype</b>
<pre class="verbatim"> <a class="l_k" href="../functions/my.html">my</a> <span class="i">$op_type</span> = <span class="i">$optype</span>[<span class="i">$op_type_num</span>]<span class="sc">;</span></pre>
<p>A simple mapping of the op type number to its type (like 'COP' or 'BINOP').</p>
</li>
<li><a name="%40specialsv_name"></a><b>@specialsv_name</b>
<pre class="verbatim"> <a class="l_k" href="../functions/my.html">my</a> <span class="i">$sv_name</span> = <span class="i">$specialsv_name</span>[<span class="i">$sv_index</span>]<span class="sc">;</span></pre>
<p>Certain SV types are considered 'special'. They're represented by
B::SPECIAL and are referred to by a number from the specialsv_list.
This array maps that number back to the name of the SV (like 'Nullsv'
or '&amp;PL_sv_undef').</p>
</li>
</ul>
<a name="AUTHOR"></a><h1>AUTHOR</h1>
<p>Malcolm Beattie, <code class="inline">mbeattie<span class="i">@sable</span>.ox.ac.uk</code>
</p>
</div>
<div id="contentFooter"><a href="http://www.perl.org"><img src="../perlpowered.png" border=0></a></div>
</div>
</div>
<div id="right">
<div id="rightContent">
<div id="leftClose">
<a href="#" onClick="closeRight()" title="Hide toolbar" onmouseover="rightCloseIcon.src='../close_purple.gif';" onmouseout="rightCloseIcon.src='../close_blue.gif';"><img src="../close_blue.gif" name="rightCloseIcon" id="rightCloseIcon" border=0></a>
</div>
<h1>Search:</h1>
<p>
<form action="../search.html" name="perldoc_search">
<input type="text" name="q" size="10" class="grey"><br>
<!--<select name="r"><option value="1" selected>Go to top result<option value="0">Show results list</select>-->
</form>
</p>
<h2>Labels:</h2>
<p>
<a href="#" onClick="addLabel('B::Asmdata','B/Asmdata.html')">Add this page</a>
</p>
<div class="labels" id="labels">
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>B::Assembler - perldoc.perl.org</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en-gb" />
<link href="../css.css" rel="stylesheet" rev="stylesheet" type="text/css" media="screen" />
</head>
<script language="JavaScript" type="text/javascript" src="../label.js"></script>
<script language="JavaScript">
pageDepth = 1;
setPath();
</script>
<body onLoad="showToolbars();loadLabels()">
<div id="pageHeader">
<div id="pageHeaderLogo">
<img src="../onion.gif">
</div>
<div id="pageHeaderText">
<a href="http://perldoc.perl.org">perldoc.perl.org</a>
</div>
</div>
<div id="pageBody">
<div id="left">
<div id="leftContent">
<div id="leftClose">
<a href="#" onClick="closeLeft()" title="Hide navigation" onmouseover="leftCloseIcon.src='../close_purple.gif';" onmouseout="leftCloseIcon.src='../close_blue.gif';"><img src="../close_blue.gif" name="leftCloseIcon" id="leftCloseIcon" border=0></a>
</div>
<h1>Manual:</h1>
<ul>
<li><a href="../index-overview.html">Overview</a></li>
<li><a href="../index-tutorials.html">Tutorials</a></li>
<li><a href="../index-faq.html">FAQs</a></li>
<li><a href="../index-history.html">History / Changes</a></li>
<li><a href="../index-licence.html">Licence</a></li>
</ul>
<h2>Reference:</h2>
<ul>
<li><a href="../index-language.html">Language</a></li>
<li><a href="../index-functions.html">Functions</a></li>
<li><a href="../perlop.html">Operators</a></li>
<li><a href="../perlvar.html">Special variables</a></li>
<li><a href="../index-pragmas.html">Pragmas</a></li>
<li><a href="../index-modules-A.html">Core modules</a></li>
<li><a href="../index-utilities.html">Utilities</a></li>
<li><a href="../index-internals.html">Internals</a></li>
<li><a href="../index-platforms.html">Platform specific</a></li>
</ul>