Advertisement
Guest User

Untitled

a guest
Dec 14th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.32 KB | None | 0 0
  1. $app->helper(
  2.     is_mobile => sub {
  3.       my $self = shift;
  4.       $self->app->log->debug( $self );
  5.       $self->app->log->debug( $self->tx );
  6.       $self->app->log->debug( $self->tx->req );
  7.       return $self->tx->req->headers->user_agent
  8.         =~ /(iPhone|iPod|iPad|Android|BlackBerry|Mobile|Palm)/ ? 1 : 0;
  9.     }
  10.   );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement