SQL::D...s::Role(3pm)
β¨ NAME β¨
SQL::Dialects::Role β bestie, it's literally the role of being a SQL::Dialect. that's it. that's the job. π
πΈ SYNOPSIS πΈ
okay so picture this, you're building your own dialect and you need the β¨auraβ¨ of a real one:
package My::SQL::Dialect;
use SQL::Dialects::Role;
sub get_config {
return <<CONFIG;
[SECTION]
item1
item2
[ANOTHER SECTION]
item1
item2
CONFIG
}
that's the whole vibe. you write one method, the role does the rest. slay. π«Ά
π¦ DESCRIPTION π¦
this module hands your class the role of being a SQL::Dialect. like, congrats, you're a dialect now, you're the main character. π
π Requirements π
you must implement this one, no skipping, i'm watching:
get_configβ
my $config = $class->get_config;
it returns info about the dialect in an INI-like format. cute little sections, cute little items, very demure.
β Implements β
and the role goes ahead and implements this for you, for free, no cap:
get_config_as_hashβ
my $config = $class->get_config_as_hash;
it gives you back whatever get_config() said, but as a hash ref. glow up fr fr. β¨
heads up: items get upper-cased, sections get lower-cased. that's just the law.
so the example up in the SYNOPSIS would come back looking like this:
{
section => {
ITEM1 => 1,
ITEM2 => 2,
},
another_section => {
ITEM1 => 1,
ITEM2 => 2,
}
}
obsessed tbh. π
π AUTHOR & COPYRIGHT π
this module is
copyright (c), 2009 by Michael G. Schwern
copyright (c), 2009-2020 by Jens Rehsack.
all rights reserved. π«‘
the module may be freely distributed under the same terms as Perl itself, using either the "GPL License" or the "Artistic License" as specified in the Perl README file. periodt.
you can reach Jeff at: jzuckerATcpan.org and Jens at: rehsackATcpan.org, or slide into the group chat via dbi-devATperl.org. π
π₯ SEE ALSO π₯
"dialect()" in SQL::Parserβ go read that one too, it's giving essential. π
and that's the whole page, bestie π β this lil manual page lives in the perl docs, perl v5.30.3, dated 2020-10-23, so yeah it's a 2020 baby but it still ate. π
β¨π¦
π¦ where this page comes from
- debian bookworm: libsql-statement-perl 1.414-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libsql-statement-perl 1.414-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libsql-statement-perl 1.414-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libsql-statement-perl 1.414-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsql-statement-perl 1.414-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsql-statement-perl 1.414-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms