DBIx::...orable(3pm)
π¦ NAME π¦
okay so the fancy title at the top of this page is DBIx::...orable(3pm) (they for real cut it off, iconic of them), and the module's actual government name is DBIx::Class::InflateColumn::Serializer::Storable β which is just a β¨Storable Inflatorβ¨. that's it. that's the whole job. she inflates. she deflates. she's booked and busy π
it lives in the User Contributed Perl Documentation collection, bestie, so you know it's community-coded. π«Ά
πΈ SYNOPSIS πΈ
okay so first you gotta set up your schema table situation, like so:
package MySchema::Table;
use base 'DBIx::Class';
__PACKAGE__->load_components('InflateColumn::Serializer', 'Core');
__PACKAGE__->add_columns(
'data_column' => {
'data_type' => 'VARCHAR',
'size' => 255,
'serializer_class' => 'Storable'
}
);
see that 'serializer_class' => 'Storable'? that's the moment. that's the main character line π
then in your code...
my $struct = { 'I' => { 'am' => 'a struct' };
$obj->data_column($struct);
$obj->update;
(ngl that hashref above is missing its closing brace, but I am NOT the one who wrote it so I'm not touching it π verbatim is verbatim bestie)
and you can recover your data structure with:
my $obj = ...->find(...);
my $struct = $obj->data_column;
it just... comes back?? to you?? like a situationship that actually texted back π obsessed.
the data structures you assign to data_column will be saved in the database in Storable format. that's the whole vibe. that's the assignment.
π§ get_freezer
Called by DBIx::Class::InflateColumn::Serializer to get the routine that serializes the data passed to it. Returns a coderef.
basically the serializer class hollers at get_freezer like "bestie, give me the thing that freezes data" and she hands over a coderef. that's it. she delivered. π
π₯ get_unfreezer
Called by DBIx::Class::InflateColumn::Serializer to get the routine that deserializes the data stored in the column. Returns a coderef.
the reverse queen π§ she's the one who un-freezes your lil data blob when it comes back out of the column. also returns a coderef. no cap.
π lowkey reminder: both of these are called by DBIx::Class::InflateColumn::Serializer β you're not out here calling them yourself, they're the behind-the-scenes girlies making the magic happen.
and that's the page!! β¨ this was DBIx::...orable(3pm) from perl v5.40.1, dated 2026-05-07, brought to you by User Contributed Perl Documentation π«Ά thanks for coming to my ted talk, go serialize something cute ππ
π¦ where this page comes from
- ubuntu stonking: libdbix-class-inflatecolumn-serializer-perl 0.10-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