NAME
DBIO::Generate::Style::Vanilla - Vanilla-style Result class emitter for DBIO::Generate
VERSION
version 0.900004
METHODS
emit
my $src = DBIO::Generate::Style::Vanilla->emit($spec);
Takes a $spec hashref and returns Perl source text.
The extra_statements block (driver-supplied via "result_class_extra_statements" in DBIO::Introspect::Base) is emitted as a sequence of __PACKAGE__-method(@args)> calls. The method name is a Perl identifier. Each argument is rendered by its kind:
a plain string becomes a quoted string literal, whatever it contains. A purely-numeric string is emitted quoted as a string rather than as a bare number
a scalar reference (
\"code") is Perl code and is written into the source as it is -- the one way for a driver to hand over an expressionany other reference (e.g. a PostgreSQL
pg_indexdef hashref) is serialised via Data::Dumper with Indent=0, Terse=1, Sortkeys=1 -- the round-trip is the contract, not the spelling
The relationship methods of relationships are belongs_to, has_one, has_many, might_have and many_to_many; every style checks them and the extra_statements method names.
AUTHOR
DBIO & DBIx::Class Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.