package Text::Wigwam::Library::Misc;

    use strict;
    use warnings;
    our $VERSION = '0.01';

    use base q/Exporter/;

    use Text::Wigwam::Const qw/ ANY /;

    our %EXPORT_TAGS = (
        all => [
          qw/
            _proto_eat _eat
          /
        ],
        eat => [ qw/ _proto_eat _eat / ],
    );
    our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
    our @EXPORT = qw( );

=head1 Name

Text::Wigwam::Library::Misc - A Wigwam directive library.

=head1 Description

This library provides miscellaneous directives.

=head1 Usage

The directives within this library can be imported into specific branches of
the directive tree (which transcends from  C<Text::Wigwam::Directives>) via
plug-ins or modules using one of the following techniques.

 package Text::Wigwam::Directives::some::arbitrary::branch;
 # import everything
 use Text::Wigwam::Library::Misc qw/:all/;

 package Text::Wigwam::Directives::another::arbitrary::branch;
 # import selectively
 use Text::Wigwam::Library::Misc qw/ :eat /;

=head1 Directives

=cut

sub _proto_eat { [ ANY ] }
sub _eat { $_[0]->get_arg; return }

=head2 #eat I<expr>

Eats the resulting value of I<expr>. Useful for destroying a return value
which you don't want output into the template. EXPR types will not be
executed, as it uses the ANY context to execute its argument.

 [!!
  /* All examples herein produce no output */
  #eat "Your words"

  /*
    The following produces no output, and the "foo" template does not execute.
    This is probably not what was intended.
  */
  #eat #template "foo"

  /* executes the "foo" template, but produces no output */
  #eat #call #template "foo" () 
 !!]

=cut

1;
