use warnings;
use Carp ();
use Scalar::Util ();
-use MRO::Compat;
-our $VERSION = '0.10001';
+BEGIN {
+ if ($] < 5.009_005) {
+ require MRO::Compat;
+ }
+ else {
+ require mro;
+ }
+}
+
+our $VERSION = '0.10002';
$VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases
# when changing minimum version don't forget to adjust L</PERFORMANCE> and
=head1 SYNOPSIS
+ use base 'Class::Accessor::Grouped';
+
+ # make basic accessors for objects
+ __PACKAGE__->mk_group_accessors(simple => qw(id name email));
+
+ # make accessor that works for objects and classes
+ __PACKAGE__->mk_group_accessors(inherited => 'awesome_level');
+
=head1 DESCRIPTION
This class lets you build groups of accessors that will call different
Caelum: Rafael Kitover <rkitover@cpan.org>
+frew: Arthur Axel "fREW" Schmidt <frioux@gmail.com>
+
groditi: Guillermo Roditi <groditi@cpan.org>
Jason Plum <jason.plum@bmmsi.com>
# if after this shim was created someone wrapped it with an 'around',
# we can not blindly reinstall the method slot - we will destroy the
# wrapper. Silently chain execution further...
- if ($expected_cref != $current_class->can($methname)) {
+ if ( !$expected_cref or $expected_cref != $current_class->can($methname) ) {
# there is no point in re-determining it on every subsequent call,
# just store for future reference