You can use Test::MockObject to mock the parser object and pass it when creating your own object.
my $mock = Test::MockObject->new();
$mock->mock( 'frobnicate',
sub { return 'file that is not part of test environment' } );
my $obj = Your::Class->new(parser => $mock);
ok( $obj->load_and_validate_data );
It will create an object that has a method frobnicate
. When called in your load_and_validate_data
, it will return the controlled values you want it to return. There's a bunch of other stuff you can do with it. I suggest you take a look at the documentation.