- fix bug in ResultSetManager when a class has no subs with attrs
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / AccessorGroup.pm
index 0625f01..79db519 100644 (file)
@@ -3,7 +3,7 @@ package DBIx::Class::AccessorGroup;
 use strict;
 use warnings;
 
-use NEXT;
+use Carp::Clan qw/^DBIx::Class/;
 
 =head1 NAME 
 
@@ -18,8 +18,6 @@ getters and setters.
 
 =head1 METHODS
 
-=over 4
-
 =cut
 
 sub mk_group_accessors {
@@ -42,8 +40,7 @@ sub mk_group_accessors {
 
         foreach my $field (@fields) {
             if( $field eq 'DESTROY' ) {
-                require Carp;
-                &Carp::carp("Having a data accessor named DESTROY  in ".
+                carp("Having a data accessor named DESTROY  in ".
                              "'$class' is unwise.");
             }
 
@@ -106,8 +103,7 @@ sub make_group_ro_accessor {
 
         if(@_) {
             my $caller = caller;
-            require Carp;
-            Carp::croak("'$caller' cannot alter the value of '$field' on ".
+            croak("'$caller' cannot alter the value of '$field' on ".
                         "objects of class '$class'");
         }
         else {
@@ -127,7 +123,7 @@ sub make_group_wo_accessor {
         unless (@_) {
             my $caller = caller;
             require Carp;
-            Carp::croak("'$caller' cannot access the value of '$field' on ".
+            croak("'$caller' cannot access the value of '$field' on ".
                         "objects of class '$class'");
         }
         else {
@@ -148,8 +144,6 @@ sub set_simple {
 
 1;
 
-=back
-
 =head1 AUTHORS
 
 Matt S. Trout <mst@shadowcatsystems.co.uk>