Perl DBIx::Class Weirdness


I see the following error:

> ./
MyApp::Schema::Result::._RptCase does not look like a package name at /usr/local/lib/perl5/site_perl/Module/ line 208.
Compilation failed in require at ./ line 10.
BEGIN failed--compilation aborted at ./ line 10.


The script looks like this:


use v5.10;
use strict;
use warnings;
use Data::Dumper;
no warnings 'experimental';

use lib 'lib';
use MyApp::Schema;
use DBIx::Class;

# Include the login info
our $dbhost;
our $dbuser;
our $dbpass;
require '';

# Setup the DB Connections
my $source = "dbi:mysql:database=dvt_teamtrack_reporting;host=localhost";
my $schema = MyApp::Schema->connect($source, 'root');

# We only care about the EM projects right now
my $em_rs = $schema->resultset('RptProject')->search({ ts_ladder => { -like => '%Emerging Markets%'} });

# Grab the project IDs
my @project_ids = $em_rs->get_column('ts_id')->all;

Line 10 is the 'use MyApp::Schema;' line.

I generated the Schema for DBIx::Class by using dbicdump and connected to the local mysql as root with no password by running:

> dbicdump -o dump_directory=./lib -o components='["InflateColumn::DateTime"]' MyApp::Schema dbi:mysql:dvt_reporting root

This error seems to go away if I

rm -fr lib
and re-run the dbicdump command. But only if I actually rm and rerun dbicdump. Just rerunning dbicdump over the top is not enough.