Carrot

 view release on metacpan or  search on metacpan

lib/Carrot/Productivity/Text/Placeholder./documentation/Placeholder-en.pod  view on Meta::CPAN

Like parser above, but sets the default parser, which is used from here onwards.

=item Carrot::Productivity::Text::Placeholder::build_parser($re_specification)

Not a method, but a plain subroutine. Returns a code reference created from the regular expression $re_specification. The code reference can then be re-used for the constructor. For cases where you don't want to touch the default parser.

=item add_miniplates($miniplate, ...)

Add placeholder miniplates. In order to do something useful, you need to have placeholder miniplates. The miniplate can be referred to as a package/class name relative to Carrot::Productivity::Text::Placeholder or as a fully qualified package/class n...

The order in which miniplates are given is preserved. This is important for miniplates matching any placeholder.

=back

=head1 PLACEHOLDER MINIPLATES

The following is an overview of the miniplates shipped with Carrot::Productivity::Text::Placeholder.

=over 8

=item L<::Aggregator|Carrot::Productivity::Text::Placeholder::Aggregator>

Miniplates placeholder miniplates, which share the same subject. For example, the subject is the file name for OS::Unix::File::Name/Properties.

=item L<::Counter|Carrot::Productivity::Text::Placeholder::Generic>

Provides no placeholders by default. Any sense has to be added via add_placeholder.

=item L<::Counter|Carrot::Productivity::Text::Placeholder::Counter>

Provides the placeholder 'counter'. Increments the counter each time 'execute' is called.

=item L<::URI|Carrot::Productivity::Text::Placeholder::URI>

Provides the placeholders uri_(scheme|opaque|host|path|full). A proof-of-concept module.

=item L<::Perl_Inlined|Carrot::Productivity::Text::Placeholder::Perl_Inlined>

Provides no specific placeholders. Instead any placeholder is treated as perl code. A proof-of-concept module, which over-stretches Carrot::Productivity::Text::Placeholder. There are no plans to maintain it or develop it further.

=item L<::OS::Unix::File::Name|Carrot::Productivity::Text::Placeholder::OS::Unix::File::Name>

Provides the placeholders file_(name_full|name_path|name_only|name_extension). The file doesn't need to exists.

=item L<::OS::Unix::File::Properties|Carrot::Productivity::Text::Placeholder::OS::Unix::File::Properties>

Provides the placeholders file_(owner_id|owner_name|miniplate_id|miniplate_name|size|timestamp_creation|timestamp_modification|timestamp_status). The file must exist. Can be used together with ::OS::Unix::File::Name via ::Aggregator for the name.

=item L<::SQL::Result|Carrot::Productivity::Text::Placeholder::SQL::Result>

Provides placeholders based on a configurable RE, which requires one capture miniplate. Placeholders substituted by the captured pattern. A list of captures can be obtained. In between two calls to execute the row data is changed.

=item L<::SQL::Statement|Carrot::Productivity::Text::Placeholder::SQL::Statement>

Provides placeholders based on a configurable RE. All placeholders matching the RE are substituted by question marks. A list of matches can be obtained.

=back

You might want to search CPAN for placeholder miniplates, which are distributed separately.

=head1 KNOWN BUGS AND LIMITATIONS

This is the first public release.

Carrot::Productivity::Text::Placeholder was part of a bigger software project and has recently been separated. However, the quality of the code should be good enough for an initial release.


=head1 AUTHOR

Winfried Trumper E<lt>pub+perl(a)wt.tuxomania.netE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2011 Winfried Trumper

This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

=cut



( run in 2.932 seconds using v1.01-cache-2.11-cpan-98e64b0badf )