Locale:...oreFile(3)
πΎ NAME πΎ
Locale::TextDomain::OO::Lexicon::Role::StoreFile β bestie, it's a role that lets you store a lexicon as a file. That's the whole vibe. β¨
$Id: StoreFile.pm 573 2015-02-07 20:59:51Z steffenw $
$HeadURL:
svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/module/trunk/lib/Locale/TextDomain/OO/Lexicon/Role/StoreFile.pm
$
πΈ VERSION πΈ
1.017 β no cap, that's the number. π
π¦ DESCRIPTION π¦
So basically this module is packed with methods that help you store the lexicon as a file. That's it, that's the job. π«Ά
It implements the attributes filename and file_handle. Two little icons, both main character energy. π
β¨ SYNOPSIS β¨
Consume the role like so, bestie:
with qw(
Locale::TextDomain::OO::Lexicon::Role::StoreFile
);
$self->store_content($content);
π SUBROUTINES/METHODS π
π method store_content
Okay so here's the tea, three scenarios:
- If
file_handleis set, the content will print. π¨οΈ - If
filenameis set andfile_handleis not, a file will be stored. π - If both are not set, the content itself will be returned. πͺ
$content = $self->store_content($content);
π method filename
Set it, then store. Simple as:
$self->filename('myfile.myext')
$self->store_content;
π§ method file_handle
Pro tip from me to you: set filename also, so you get speaking error messages. And heads up β it must not be a real filename if the handle isn't a real file. π
my $filename = 'myfile.myext';
$self->filename($filename);
open my $file_handle, q{>}, $filename
or confess qq{Unable to open file "$filename" $OS_ERROR};
$self->file_handle($file_handle);
$self->store_content;
close $file_handle
or confess qq{Unable to close file "$filename" $OS_ERROR};
π EXAMPLE π
Inside of this distribution is a directory named example. Run this *.pl files. πβοΈπ¨ (Yes bestie, go run them, they're right there.)
π DIAGNOSTICS π
confess
π₯ CONFIGURATION AND ENVIRONMENT π₯
none β nothing to configure, she's low maintenance. π
β DEPENDENCIES β
CarpEnglishMoo::RoleMooX::Types::MooseLike::Basenamespace::autoclean
π INCOMPATIBILITIES π
not known β as far as anyone knows, she plays nice with everyone. π
π BUGS AND LIMITATIONS π
none
π SEE ALSO π
Locale::TextDoamin::OO
(That spelling is literally what the page says, bestie β I'm not touching it, iykyk. π )
πΈ AUTHOR πΈ
Steffen Winkler
π LICENSE AND COPYRIGHT π
Copyright (c) 2013 - 2015, Steffen Winkler "<steffenw at cpan.org>". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
And that's a wrap, bestie! π«Ά This iconic little page came to you courtesy of perl v5.42.0, dated 2025-07-25, and it's filed under Locale:...oreFile(3). Slay. π
β¨
π¦ where this page comes from
- fedora 43: perl-Locale-TextDomain-OO 1.036-19.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms