Created
March 4, 2014 18:59
-
-
Save willert/9353205 to your computer and use it in GitHub Desktop.
A complete base class for mason widgets (recipe.mp)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
has item => (); | |
has visits => (); | |
has fav_map => (); | |
has search_string => ( default => '' ); | |
has force_tab => (); | |
has uri => ( init_arg => undef, default => method () { | |
my $uri = URI->new( $.item->get_uri . $.search_string ); | |
$uri->query_param( foo => $.force_tab ) if $.force_tab; | |
$uri; | |
}); | |
method display_balance_symbols () { | |
$m->comp( 'balance_symbols.mi', symbols => $.item->balance_symbols ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: