Merge branch 'topic/cmop-merge'
Jesse Luehrs [Sat, 1 Jan 2011 18:17:38 +0000 (12:17 -0600)]
1  2 
lib/Moose/Util/TypeConstraints/OptimizedConstraints.pm

@@@ -7,20 -7,15 +7,16 @@@ use Class::MOP
  use Moose::Deprecated;
  use Scalar::Util 'blessed', 'looks_like_number';
  
- our $VERSION   = '1.9900';
- $VERSION = eval $VERSION;
- our $AUTHORITY = 'cpan:STEVAN';
  sub Value { defined($_[0]) && !ref($_[0]) }
  
  sub Ref { ref($_[0]) }
  
 -# We need to use a temporary here to flatten LVALUEs, for instance as in
 +# We might need to use a temporary here to flatten LVALUEs, for instance as in
  # Str(substr($_,0,255)).
  sub Str {
 -    my $value = $_[0];
 -    defined($value) && ref(\$value) eq 'SCALAR'
 +    defined($_[0])
 +      && (   ref(\             $_[0] ) eq 'SCALAR'
 +          || ref(\(my $value = $_[0])) eq 'SCALAR')
  }
  
  sub Num { !ref($_[0]) && looks_like_number($_[0]) }
@@@ -124,17 -119,4 +120,4 @@@ no user serviceable parts inside
  
  See L<Moose/BUGS> for details on reporting bugs.
  
- =head1 AUTHOR
- Yuval Kogman E<lt>nothingmuch@cpan.orgE<gt>
- =head1 COPYRIGHT AND LICENSE
- Copyright 2007-2010 by Infinity Interactive, Inc.
- L<http://www.iinteractive.com>
- This library is free software; you can redistribute it and/or modify
- it under the same terms as Perl itself.
  =cut