On 6/26/07, James Masters <[EMAIL PROTECTED]> wrote: );
> $loader->post_init_hook(
> sub {
> my $meta = shift;
> # For class My::Product, try to load My::Product::Extra
> my $extra_pm = $meta->class .'::Extra';
> eval "require $extra_pm";
> });
> my @classes = $loader->make_modules;
>
> and then copies the modules to the right place.
>
> looking in the Book.pm module afterwards, it has the auto-generated
> use base qw(GARD::DB::Object::AutoBase1);
> __PACKAGE__->meta->setup(...)
>
> stuff in it, as normal but no functions.
The post_init_hook specifies code that will run after each class is
initialize()d. It won't cause any code to be written to the actual
.pm files produced by make_modules(), however. For that, look into
the module_postamble parameter:
http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/Loader.pm#module_postamble
-John
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object