get_data_count()

Here's the original version of a Data::Presenter method which returns the number of data records in the object.

    sub get_data_count {
        my $self = shift;
        my %data = %$self;
        my $count = 0;
        foreach (keys %data) {
            unless ($reserved{$_}) {
                $count++;
            }
        }
        return $count;
    }

Previous Back to start of show Next
Slide: 10 get_data_count © 2003 James E. Keenan