]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/RequirementSpecItem.pm
Test: acts_as_list.t: Anpassung an Währungsumstellung
[mfinanz.git] / SL / DB / RequirementSpecItem.pm
index 641982cf1b2bb79e6f90d92277c158324256f274..d07ed04c890ed37dd2d4f7d79b08c1f1da753621 100644 (file)
@@ -104,8 +104,7 @@ sub children_sorted {
 
   croak "Not a writer" if @args;
 
-  my @children = sort { $a->position <=> $b->position } $self->children;
-  return wantarray ? @children : \@children;
+  return [ sort { $a->position <=> $b->position } $self->children ];
 }
 
 sub section {
@@ -126,3 +125,51 @@ sub child_type {
 }
 
 1;
+__END__
+
+=pod
+
+=encoding utf8
+
+=head1 NAME
+
+SL::DB::RequirementSpecItem - Items for requirement specs
+
+=head1 OVERVIEW
+
+Please see L<SL::DB::RequirementSpec> for the architectual overview.
+
+=head1 FUNCTIONS
+
+=over 4
+
+=item C<child_type>
+
+Returns the C<item_type> for children of C<$self>.
+
+=item C<children_sorted>
+
+Returns an array reference of direct children (not of grandchildren)
+for C<$self> ordered by their positional column in ascending order.
+
+=item C<section>
+
+Returns the section this item belongs to. It can be C<$self> if
+C<$self> is already a section, its parent or grandparent.
+
+=item C<validate>
+
+Validates before saving and returns an array of human-readable error
+messages in case of an error.
+
+=back
+
+=head1 BUGS
+
+Nothing here yet.
+
+=head1 AUTHOR
+
+Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
+
+=cut