Data-Rlist

 view release on metacpan or  search on metacpan

Rlist.pm.html  view on Meta::CPAN

    $ perl -e 'print *9'
    *main::9</pre>
<pre>
    $ perl -e 'print *42{GLOB}'
    GLOB(0x100110b8)</pre>
<pre>
    $ perl -e '*x = 42; print $::{42}, *x'
    *main::42*main::42</pre>
<pre>
    $ perl -v
    This is perl, v5.8.8 built for cygwin-thread-multi-64int
    (with 8 registered patches, see perl -V for more detail)</pre>
<p>Of course these  behaviors are not reliable, and  may disappear in future versions  of <em>perl</em>.  In
German  you  say   ``Schmutzeffekt''  (dirt  effect)  for  certain   mechanical  effects  that  occur
non-intendedly,  because machines  and electrical  circuits are  not perfect,  and so  is software.
However, ``Schmutzeffekts'' are neither bugs nor features; these are phenomenons.</p>
<p><strong>LEXICAL VARIABLES</strong></p>
<p>Lexical variables (<em>my</em> variables) are not stored in stashes, and do not require typeglobs.  These
variables are stored in a special array, the <em>scratchpad</em>, assigned to each block, subroutine, and
thread. These are really private variables, and they cannot be <em>local</em>ized.  Each lexical variable
occupies a  slot in the scratchpad;  hence is addressed by  an integer index, not  a symbol.  <em>my</em>

lib/Data/Rlist.pm  view on Meta::CPAN

    $ perl -e 'print *9'
    *main::9

    $ perl -e 'print *42{GLOB}'
    GLOB(0x100110b8)

    $ perl -e '*x = 42; print $::{42}, *x'
    *main::42*main::42

    $ perl -v
    This is perl, v5.8.8 built for cygwin-thread-multi-64int
    (with 8 registered patches, see perl -V for more detail)

Of course these  behaviors are not reliable, and  may disappear in future versions  of F<perl>.  In
German  you  say   "Schmutzeffekt"  (dirt  effect)  for  certain   mechanical  effects  that  occur
non-intendedly,  because machines  and electrical  circuits are  not perfect,  and so  is software.
However, "Schmutzeffekts" are neither bugs nor features; these are phenomenons.

B<LEXICAL VARIABLES>

Lexical variables (F<my> variables) are not stored in stashes, and do not require typeglobs.  These

t/deparse.t  view on Meta::CPAN

#!/usr/bin/perl
#
# deparse.t
#
# Use B::Deparse to deparse Rlist.pm, quote the whole text and let read it as
# Rlist.  Write as outlined text, which will use here-docs (heavy ones, in this
# case).
#
# BUGS DISCOVERED IN PERL
#
#	This is perl, v5.8.7 built for cygwin-thread-multi-64int
#	This is perl, v5.8.4 built for sun4-solaris
#
# Deparsing of \&Data::Rlist::lex fails:
#
#	Can't call method "name" on an undefined value at
#	/usr/local/lib/perl5/5.8.4/sun4-solaris/B/Deparse.pm line 948.
#
# $Writestamp: 2008-07-21 17:07:19 andreas$
# $Compile: perl -M'constant standalone => 1' deparse.t$

use warnings;



( run in 0.549 second using v1.01-cache-2.11-cpan-49f99fa48dc )