Hello Monks,
UPDATE: I need help iterating through a resultset of DBIx::Class::ResultSet. It does not appear to give me the amount of records I specify on command line. Here is is my code:
#! /usr/bin/env perl
use strict;
use warnings;
use Getopt::Long;
use DBIx::Class::ResultSet;
use Data::Dumper;
use My::App::Schema;
use Smart::Comments '###';
my $max_records = '';
GetOptions("max_records=i" => \$max_records)
or die ("Error in command line arguments\n");
my @results = My::App::Schema->schema->resultset('MyTable')->all;
for my $result ( @results ) {
### Processing Domain ID: ($result->id)
for ( 0..$max_records ) {
print $result."\n";
}
}
Any insight is greatly appreciated :)