<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Parrot - System Environment</title> <link rel="stylesheet" type="text/css" href="../../../resources/parrot.css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="wrapper"> <div id="header"> <a href="http://www.parrot.org"> <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot"> </a> </div> <!-- "header" --> <div id="divider"></div> <div id="mainbody"> <div id="breadcrumb"> <a href="../../../html/index.html">Home</a> » <a href="../../../html/pmc.html">PMCs</a> » System Environment </div> <h1><a name="NAME" >NAME</a></h1> <p>src/pmc/env.pmc - System Environment</p> <h1><a name="DESCRIPTION" >DESCRIPTION</a></h1> <p><code>Env</code> is a singleton class which provides access to the system environment.</p> <h2><a name="Methods" >Methods</a></h2> <dl> <dt><a name="void_*get_pointer()" ><b><code>void *get_pointer()</b></code></a></dt> <dt><a name="void_set_pointer(void_*ptr)" ><b><code>void set_pointer(void *ptr)</b></code></a></dt> These two functions are part of the singleton creation interface. For more information see <em>src/pmc.c</em>. <dt><a name="PMC_*get_iter()" ><b><code>PMC *get_iter()</b></code></a></dt> Returns a new iterator for the environment. This method is questionable, as environ is not in ISO-C. <dt><a name="INTVAL_elements()" ><b><code>INTVAL elements()</b></code></a></dt> Returns the number of elements in the environment. This method is questionable, as environ is not in ISO-C. <dt><a name="INTVAL_get_bool()" ><b><code>INTVAL get_bool()</b></code></a></dt> Returns whether the environment has any elements. <dt><a name="INTVAL_get_integer()" ><b><code>INTVAL get_integer()</b></code></a></dt> Returns the size of the hash. <dt><a name="FLOATVAL_get_number()" ><b><code>FLOATVAL get_number()</b></code></a></dt> Returns the size of the hash. <dt><a name="STRING_*get_string_keyed(PMC_*key)" ><b><code>STRING *get_string_keyed(PMC *key)</b></code></a></dt> Returns the Parrot string value for the environment variable <code>*key</code>. <dt><a name="STRING_*get_string_keyed_int(PMC_*key)" ><b><code>STRING *get_string_keyed_int(PMC *key)</b></code></a></dt> Returns the Parrot string value for the environment variable at position <code>pos</code>.Used during iteration. <dt><a name="STRING_*get_pmc_keyed(PMC_*key)" ><b><code>STRING *get_pmc_keyed(PMC *key)</b></code></a></dt> Returns a String PMC for the environment variable <code>*key</code>. <dt><a name="void_set_string_keyed(PMC_*key,_STRING_*value)" ><b><code>void set_string_keyed(PMC *key, STRING *value)</b></code></a></dt> Sets the environment variable <code>*key</code> to <code>*value</code>. <dt><a name="void_set_pmc_keyed(PMC_*key,_PMC_*value)" ><b><code>void set_pmc_keyed(PMC *key, PMC *value)</b></code></a></dt> Sets the environment variable <code>*key</code> to <code>*value</code>. <dt><a name="INTVAL_exists_keyed(PMC_*key)" ><b><code>INTVAL exists_keyed(PMC *key)</b></code></a></dt> Returns whether the environment variable for <code>*key</code> exists. <dt><a name="void_delete_keyed(PMC_*key)" ><b><code>void delete_keyed(PMC *key)</b></code></a></dt> Deletes the the environment variable for <code>*key</code>.</dl> <h1><a name="SEE_ALSO" >SEE ALSO</a></h1> <p>PDD - <a href='http://docs.parrot.org/parrot/latest/html/docs/pdds/pdd17_pmc.pod.html#Hash_types'><a href="http://docs.parrot.org/parrot/latest/html/docs/pdds/pdd17_pmc.pod.html#Hash_types">http://docs.parrot.org/parrot/latest/html/docs/pdds/pdd17_pmc.pod.html#Hash_types</a></a></p> <p>Environment in Perl 6 - <a href='http://dev.perl.org/perl6/rfc/318.html'><a href="http://dev.perl.org/perl6/rfc/318.html">http://dev.perl.org/perl6/rfc/318.html</a></a></p> <p>Module for Perl 5 - <a href='http://search.cpan.org/~stas/Env-C-0.06/'><a href="http://search.cpan.org/~stas/Env-C-0.06/">http://search.cpan.org/~stas/Env-C-0.06/</a></a></p> </div> <!-- "mainbody" --> <div id="divider"></div> <div id="footer"> Copyright © 2002-2011, Parrot Foundation. </div> </div> <!-- "wrapper" --> </body> </html>