1Locale::TextDomain::OO:U:sLeerxiCLcoooncnta:rl:ieRb:ou:ltTeee:dx:tSPDteoormrlaeiFDnio:lc:euO(mO3e:)n:tLaetxiiocnon::Role::StoreFile(3)
2
3
4

NAME

6       Locale::TextDomain::OO::Lexicon::Role::StoreFile - Role to store a
7       lexicon as file
8
9       $Id: StoreFile.pm 573 2015-02-07 20:59:51Z steffenw $
10
11       $HeadURL:
12       svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/module/trunk/lib/Locale/TextDomain/OO/Lexicon/Role/StoreFile.pm
13       $
14

VERSION

16       1.017
17

DESCRIPTION

19       This module contains methods that helps to store the lexicon as file.
20
21       Implements attributes "filename" and "file_handle".
22

SYNOPSIS

24           with qw(
25               Locale::TextDomain::OO::Lexicon::Role::StoreFile
26           );
27
28           $self->store_content($content);
29

SUBROUTINES/METHODS

31   method store_content
32       If "file_handle" is set the content will print;
33
34       If "filename" is set and not "file_handle" a file will be stored.
35
36       If both not set the content itself will be returned.
37
38           $content = $self->store_content($content);
39
40   method filename
41           $self->filename('myfile.myext')
42           $self->store_content;
43
44   method file_handle
45       Set filename also to get a speaking error messages.  Must not a real
46       filename if the handle is not a real file.
47
48           my $filename = 'myfile.myext';
49           $self->filename($filename);
50           open my $file_handle, q{>}, $filename
51               or confess qq{Unable to open file "$filename" $OS_ERROR};
52           $self->file_handle($file_handle);
53           $self->store_content;
54           close $file_handle
55               or confess qq{Unable to close file "$filename" $OS_ERROR};
56

EXAMPLE

58       Inside of this distribution is a directory named example.  Run this
59       *.pl files.
60

DIAGNOSTICS

62       confess
63

CONFIGURATION AND ENVIRONMENT

65       none
66

DEPENDENCIES

68       Carp
69
70       English
71
72       Moo::Role
73
74       MooX::Types::MooseLike::Base
75
76       namespace::autoclean
77

INCOMPATIBILITIES

79       not known
80

BUGS AND LIMITATIONS

82       none
83

SEE ALSO

85       Locale::TextDoamin::OO
86

AUTHOR

88       Steffen Winkler
89
91       Copyright (c) 2013 - 2015, Steffen Winkler "<steffenw at cpan.org>".
92       All rights reserved.
93
94       This module is free software; you can redistribute it and/or modify it
95       under the same terms as Perl itself.
96
97
98
99perl v5.36.0               Locale:2:0T2e2x-t0D7o-m2a2in::OO::Lexicon::Role::StoreFile(3)
Impressum