6 use Test::More tests => 3;
10 package MyApp::Meta::Class;
13 extends 'Moose::Meta::Class';
15 has 'table' => ( is => 'rw' );
19 package MyApp::Mooseish;
27 Moose::Exporter->build_import_methods(
28 with_caller => ['has_table'],
34 Moose->init_meta( @_, metaclass => 'MyApp::Meta::Class' );
39 $caller->meta()->table(shift);
46 MyApp::Mooseish->import;
50 has( 'username' => ( is => 'ro' ) );
51 has( 'password' => ( is => 'ro' ) );
56 isa_ok( MyApp::User->meta, 'MyApp::Meta::Class' );
57 is( MyApp::User->meta->table, 'User',
58 'MyApp::User->meta->table returns User' );
59 ok( MyApp::User->can('username'),
60 'MyApp::User has username method' );