Advertisement
Guest User

Untitled

a guest
Nov 30th, 2010
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. diff --git a/lib/Mojo/Base.pm b/lib/Mojo/Base.pm
  2. index e515c27..f5ac282 100644
  3. --- a/lib/Mojo/Base.pm
  4. +++ b/lib/Mojo/Base.pm
  5. @@ -25,6 +25,9 @@ sub attr {
  6. my $attrs = shift;
  7. my $default = shift;
  8.  
  9. + # to allow app->attr('foo') for Mojolicious::Lite apps instead of (ref app)->attr(...)
  10. + $class = ref $class || $class;
  11. +
  12. # Check for more arguments
  13. Carp::croak('Attribute generator called with too many arguments') if @_;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement