~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy

« back to all changes in this revision

Viewing changes to docs/api/APR/PerlIO.pod

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2005-08-12 01:40:38 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050812014038-gjigefs55pqx4qc8
Tags: 2.0.1-3
Grr.  Really include perl.conf file; it got lost due to diff not
wanting to add an empty file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
      # work with $fh as normal $fh
18
18
      close $fh;
19
19
  
20
 
      return Apache::OK;
 
20
      return Apache2::Const::OK;
21
21
  }
22
22
 
23
23
  # outside mod_perl
24
 
  % perl -MApache2 -MAPR -MAPR::PerlIO -MAPR::Pool -le \
 
24
  % perl -MAPR -MAPR::PerlIO -MAPR::Pool -le \
25
25
  'open my $fh, ">:APR", "/tmp/apr", APR::Pool->new or die "$!"; \
26
26
   print $fh "whoah!"; \
27
27
   close $fh;'
41
41
to APR. But you can use APR Perl IO directly if you want.
42
42
 
43
43
 
44
 
 
45
 
 
46
 
 
47
 
=head1 Constants
48
 
 
49
 
 
50
 
 
51
 
=head2 APR::PerlIO::PERLIO_LAYERS_ARE_ENABLED
 
44
=head1 Prerequisites
 
45
 
 
46
Not every Perl will have full C<APR::PerlIO> functionality available.
52
47
 
53
48
Before using the Perl IO APR layer one has to check whether it's
54
 
supported by the used APR/Perl build.
55
 
 
 
49
supported by the used APR/Perl build. Perl 5.8.x or higher with perlio
 
50
enabled is required. You can check whether your Perl fits the bill by
 
51
running:
 
52
 
 
53
  % perl -V:useperlio
 
54
  useperlio='define';
 
55
 
 
56
It should say I<define>.
 
57
 
 
58
If you need to do the checking in the code, there is a special
 
59
constant provided by C<APR::PerlIO>, which can be used as follows:
 
60
 
 
61
  use APR::PerlIO ();
56
62
  die "This Perl build doesn't support PerlIO layers"
57
63
      unless APR::PerlIO::PERLIO_LAYERS_ARE_ENABLED;
58
64
 
61
67
builds not supporting Perl IO layers.
62
68
 
63
69
 
 
70
=head1 Constants
 
71
 
 
72
 
 
73
 
 
74
=head2 C<APR::PerlIO::PERLIO_LAYERS_ARE_ENABLED>
 
75
 
 
76
See L<Prerequisites|/Prerequisites>.
 
77
 
 
78
 
64
79
 
65
80
 
66
81
 
109
124
 
110
125
=item ret: ( integer )
111
126
 
112
 
success or failure value (true/false).
 
127
success or failure value (boolean).
113
128
 
114
 
=item since: 1.99_10
 
129
=item since: 2.0.00
115
130
 
116
131
=back
117
132
 
138
153
 
139
154
=over 4
140
155
 
141
 
=item since: 1.99_10
 
156
=item since: 2.0.00
142
157
 
143
158
=back
144
159
 
166
181
=head1 Copyright
167
182
 
168
183
mod_perl 2.0 and its core modules are copyrighted under
169
 
The Apache Software License, Version 1.1.
 
184
The Apache Software License, Version 2.0.
170
185
 
171
186
 
172
187