NAME

Modwheel::Template::Shortcuts.

Class for expanding shortcut abbreviations in strings.

SYNOPSIS

my $string = '[http:www.google.com|Gooooogle]';
my $shortcuts = Modwheel::Template::Shortcuts->new($template);
$string = $shortcuts->parse($string);
print $string, "\n";

# string is now: '<a href="http://www.google.com">Gooooogle</a>'
# with the default modwheel configuration.

CONSTRUCTOR

public: Modwheel::Template::Shortcuts->new($template)

Create a new Shortcuts object.

ACCESSORS

private: $shortcuts->template($template)

Set or get the Modwheel template object.

private: $shortcuts->resolvers($resolvers)

Set or get the current resolvers hash.

private: $shortcuts->init_resolvers()

Initialize the resolvers hash using the modwheel configuration file. Used by new().

public: $shortcuts->parse($string)

Resolve shortcuts in $string.

private: $shortcuts->resolve($string)

Private function used by parse() to resolve the shortcuts.

HISTORY

0.1 (13.06.2004) Initial version.

AUTHORS

Ask Solem Hoel ask@0x61736b.net

COPYRIGHT

Copyright (C) 2004-2007 Ask Solem Hoel. All rights reserved.