Winfried Trumper > Text-Placeholder > Text::Placeholder::Group::URI

Download:
Text-Placeholder-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Text::Placeholder::Group::URI - symbolic access to parts of an URI

SYNOPSIS ^

        use Text::Placeholder;
        my $placeholder = Text::Placeholder->new(
                my $uri = '::URI');
        $placeholder->compile('Host: [=uri_host=]');

        $uri->subject('http://www.perl.org/');
        print ${$placeholder->execute()}, "<-\n";

DESCRIPTION ^

A proof-of-concept module.

Text::Placeholder::Group::URI provides the placeholders 'uri_(scheme|opaque|host|path|full)'.

METHOD REFERENCE (API) ^

subject($uri)

Sets or gets the string representation of the URI.

add_placeholder($placeholder, $code_ref)

Adds the $code_ref under the name of $placeholder. $code_ref is executed and returns the current value to be substituted for $placeholder.

KNOWN BUGS AND LIMITATIONS ^

This is the first public release.

AUTHOR ^

Winfried Trumper <pub+perl(a)wt.tuxomania.net>

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.

syntax highlighting: