Catalyst-Plugin-Shorten

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/Shorten.pm  view on Meta::CPAN

144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
        Shorten::Store::Dummy
/;
 
sub auto :Path :Args(0) {
        my ($self, $c) = @_;
        $c->shorten_extract; # checks whether the shorten param exists if it does merges the stored params into the request
}
 
........
 
sub endpoint :Chained('base') :PathPart('ending') :Args('0') {
        my ($self, $c) = @_;
 
        my $str = $c->shorten(); # returns bijection references to an ID in the store.
        my $url = $c->shorten(as_uri => 1); # return a url to the current endpoint replacing all params with localhost:300/ending?s=GH
}
 
-------
 
use Catalyst qw/
        Shorten
        Shorten::Store::Dummy
/;
 
__PACKAGE__->config(



( run in 0.284 second using v1.01-cache-2.11-cpan-e5176c747c2 )