#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use lib './'; use Thing; my $test = Thing->new; my $search = { 1 => 'one', 2 => 'two', 3 => 'three', 4 => 'four' }; $test->search( $search ); print Dumper $test->search; my $data = [{ thing => 'two', blah => 'barf', => other => 'four' }]; $test->data( $data ); $data = [{ thing => 'three', blah => 'one', => other => 'four', bl => "another", of => "something" }]; $test->data( $data ); print Dumper $test->data;