=pod

=head1 Zoidscript

Since Zoidberg does not do the language interpreting itself -- it uses
perl to do this -- there is no real independent zoidscript language.
Context ZOID is almost the same as context PERL, the only real difference
is that context PERL gets the prefix C<no strict> before evalling.

But ...

Zoidberg does do some preprocessing before evalling a block of context ZOID,
it does even do the same preprocessing before before evalling a block perl.

The exact parsing is configged by C<{grammar}{eval_zoid_gram}> but by default
it goes as follows:

There are two extra namespaces defined:

one by the regex: C<(?E<lt>![\w\}\)\]])-E<gt>>

and a second by the pound sign E<pound> (as oppossed to the dollar sign $)

If the C<{core}{show_naked_zoid}> bit is false, these two are interpreted the same.

=head2 The E<pound> namespace

This name space includes some subs and vars from the zoidberg parent object but
maps all other vars assigned to it to the C<{vars}> hash.

Subs and vars that are visible on this not-naked zoid are listed in C<{core}{clothes}>.
One can add or remove these clothes in a simple way using the C<hide> and C<un_hide> commands.

Also there is a I<E<pound>_> variable, which is analogue to C<$_> but has a broader meaning.
For perl and zoid blocks E<pound>_ equals $_ but in contrast to $_, E<pound>_ also can be
used accross blocks and is in some cases defined for other contexts as well.

On YAPC::Europe::2002 we heard Larry mumble how he would love to use all kinds of UTF8
brackets to create a nice perl6 syntax. As it turns out there are still ascii chars unused
in perl :) Makes you wonder how perl would have looked if larry had a european keyboard instead of
plain old qwerty.

=head2 The -> namespace

As stated above unless C<{core}{show_naked_zoid}> is true this namespace behaves the same as
the the E<pound> namespace.

Both once zoid is shown naked this becomes a abbreviation for C<$self-E<gt>>.
This allows one to call any function of Zoidberg, or of one of the plugins in a
straigthforward manner from the commandline.

Of course one always can use C<$self-E<gt>sub> to call functions of Zoidberg in perl and
zoid blocks, but not only is C<-E<gt>> 5 chars shorter then C<$self-E<gt>> also it provides us
with a perfect handle to force tab-expansion on $self. One should be aware though that this
namespace limits the usage of white space in oo-oriented perl code -- we think this is but a
small sacrafice to save 5 chars.

Possibly there will be a "strict_perl" bit sometime in the future -- bug me if you need it.

=head2 Examples

C<zoidE<gt> E<pound>{my_var} = "home/pardus/my_script.pl" ; ls -al E<pound>_>

-rw-r--r--    1 pardus   users          44 Oct 30 16:58 /home/pardus/my_script.pl

C<zoidE<gt> E<pound>{Some_var} = "some string" && perl{print $self-E<gt>{vars}{some_var}} >

Some string


C<zoidE<gt> _unhide list_clothes>

C<zoidE<gt> _print -E<gt>list_clothes>

->list_clothes = 
[
  [
    '{config}',
    '{core}',
    '{grammar}',
    'list_clothes'
  ]
];

=head2 Note

One should notice that the shielding of the parent Zoidberg object, as provided
when C<{core}{show_naked_zoid}> is false, provides no security of any kind.
After all it is perl and there are numerous ways to hack around.
Its just makes typing faster and the amount of possibilities for tab-expansion
smaller.

=cut
