1DBIx::Class::Helper::ScUhseemra:C:oGnetnreiDrbBauIttxee:Sd:oCuPlreacrsels(:3D:)oHceulmpeenrt:a:tSicohnema::GenerateSource(3)
2
3
4

NAME

6       DBIx::Class::Helper::Schema::GenerateSource - Generate sources directly
7       from your Schema
8

SYNOPSIS

10        package MyApp::Schema;
11
12        __PACKAGE__->load_components('Helper::Schema::GenerateSource');
13
14        __PACKAGE__->generate_source(User => 'MyCompany::BaseResult::User');
15

DESCRIPTION

17       This helper allows you to handily and correctly add new result sources
18       to your schema based on existing result sources.  Typically this would
19       be done with something like:
20
21        package MyApp::Schema::Result::MessegeQueue;
22
23        use parent 'MyCo::Schema::Result::MessageQueue';
24
25        __PACKAGE__->table(__PACKAGE__->table);
26
27        1;
28
29       which clearly is in its own file.  This should still be done when you
30       need to add columns or really do anything other than just basic
31       addition of the result source to your schema.
32
33       Note: This component correctly generates an "anonymous" subclass of the
34       given base class.  Do not depend on the name of the subclass as it is
35       currently considered unstable.
36

METHODS

38   generate_source
39        $schema->generate_source(User => 'MyCompany::BaseResult::User')
40
41       The first argument to "generate_source" is the "moniker" to register
42       the class as, the second argument is the base class for the new result
43       source.
44

AUTHOR

46       Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
47
49       This software is copyright (c) 2020 by Arthur Axel "fREW" Schmidt.
50
51       This is free software; you can redistribute it and/or modify it under
52       the same terms as the Perl 5 programming language system itself.
53
54
55
56perl v5.32.0                    DB2I0x2:0:-C0l7a-s2s8::Helper::Schema::GenerateSource(3)
Impressum