This file is indexed.

/usr/share/perl5/Inline/FAQ.pod is in libinline-perl 0.80-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
=pod

=for comment
DO NOT EDIT. This Pod was generated by Swim v0.1.39.
See http://github.com/ingydotnet/swim-pm#readme

=encoding utf8

=head1 NAME

Inline-FAQ - The Inline FAQ

=head1 DESCRIPTION

Welcome to the official Inline FAQ. In this case, B<FAQ> means: B<Formerly
Answered Questions>

This is a collection of old, long-winded emails that myself and others have
sent to the Inline mailing list. (inline@perl.org) They have been reviewed and
edited for general Inline edification. Some of them may be related to a
specific language. They are presented here in a traditional FAQ layout.

=head1 GENERAL INLINE

Since there is only a handful of content so far, all FAQs are currently under
this heading.

=head2 How disposable is a C<.Inline> or C<_Inline> directory?

I probably need to be more emphatic about the role of C<_Inline/> cache
directories. Since they are created automatically, they are completely
disposable. I delete them all the time. And it is fine to have a different one
for each project. In fact as long as you don't have C<~/.Inline/> defined,
Inline will create a new C<./_Inline> directory (unless, you've done something
to override this automatic process - such as using the DIRECTORY config
option, or using the C<PERL_INLINE_DIRECTORY> environment variable). You can
move that to C<./.Inline> and it will continue to work if you want togive it
more longevity and hide it from view. There is a long complicated list of
rules about how C<[_.]Inline/> directories are used/created. But it was
designed to give you the most flexibility/ease-of-use. Never be afraid to nuke
'em. They'll just pop right back next time they're needed. :)

=head2 Whatever happened to the C<SITE_INSTALL> option?

C<SITE_INSTALL> is gone. I was going to leave it in and change the semantics,
but thought it better to remove it, so people wouldn't try to use it the old
way. There is now C<_INSTALL_> (but you're not supposed to know that :). It
works magically through the use of Inline::MakeMaker. I explained this earlier
but it's worth going through again because it's the biggest change for 0.40.
Here's how to 'permanently' install an Inline extension (Inline based module)
with 0.40:

=over

=item 1.

Create a module with Inline.

=item 2.

Test it using the normal / local C<_Inline/> cache.

=item 3.

Create a Makefile.PL (like the one produced by h2xs)

=item 4.

Change 'use ExtUtils::MakeMaker' to 'use Inline::MakeMaker'

=item 5.

In the Makefile.PL's WriteMakefile() insert:

    CONFIGURE_REQUIRES  =>  {
        'Inline::MakeMaker'     => 0.45,
        'ExtUtils::MakeMaker'   => 6.52,
    },

(See the "Writing Modules with Inline" section of Inline.pod for an
explanation / elaboration.)

=item 6.

Change your 'use Inline C => DATA' to 'use Inline C => DATA => NAME => Foo

=back

=> VERSION => 1.23' + Make sure NAME matches your package name ('Foo'), or
=> begins with 'Foo::'. + If you want to quiet a harmless warning that will
=> appear when the module is loaded via "require", do "Inline->init();". See
=> "Writing Modules with Inline" in the Inline pod for details. + Make sure
=> VERSION matches $Foo::VERSION. This must be a string (not a number)
=> matching C</^\d\.\d\d$/> + Do the perl / make / test / install dance
=> (thanks binkley :)

With Inline 0.41 (or thereabouts) you can skip steps 3 & 4, and just say
C<perl -MInline=INSTALL ./Foo.pm>. This will work for non-Inline modules too.
It will become the defacto standard (since there is no easy standard) way of
installing a Perl module. It will allow Makefile.PL parameters C<perl -
MInline=INSTALL ./Foo.pm - PREFIX=/home/ingy/perl> and things like that. It
will also make use of a MANIFEST if you provide one.

=head2 How do I create a binary distribution using Inline?

I've figured out how to create and install a PPM binary distribution;
with or without distributing the C code! And I've decided to share it
with all of you :)

NOTE: Future versions of Inline will make this process a one line command. But
      for now just use this simple recipe.

The Inline 0.40 distribution comes with a sample extension module called
Math::Simple. Theoretically you could distribute this module on CPAN. It has
all the necessary support for installation. You can find it in C<Inline-
0.40/modules/Math/Simple/>. Here are the steps for converting this into a
binary distribution B<without> C source code.

NOTE: The recipient of this binary distribution will need to have the
      PPM.pm module installed. This module requires a lot of other CPAN
      modules. ActivePerl (available for Win32, Linux, and Solaris) has all
      of these bundled. While ActivePerl isn't required, it makes things (a
      lot) easier.

=over

=item 1.

cd C<Inline-0.40/Math/Simple/>

=item 2.

Divide Simple.pm into two files:

    ---8<--- (Simple.pm)
    package Math::Simple;
    use strict;
    require Exporter;
    @Math::Simple::ISA = qw(Exporter);
    @Math::Simple::EXPORT = qw(add subtract);
    $Math::Simple::VERSION = '1.23';

    use Inline (C => 'src/Simple.c' =>
                NAME => 'Math::Simple',
                VERSION => '1.23',
               );
    1;
    ---8<---
    ---8<--- (src/Simple.c)
    int add (int x, int y) {
        return x + y;
    }

    int subtract (int x, int y) {
        return x - y;
    }
    ---8<---

=item 3.

now you have the Perl in one file and the C in the other. The C code must be

=back

in a subdirectory. + Note that I also changed the term 'DATA' to the name of
the C file. This will work just as if the C were still inline. + Run 'perl
Makefile.PL' + Run 'make test' + Get the MD5 key from
C<blib/arch/auto/Math/Simple/Simple.inl> + Edit C<blib/lib/Math/Simple.pm>.
Change C<src/Simple.c> to C<02c61710cab5b659efc343a9a830aa73> (the MD5 key)

=over

=item 1.

Run 'make ppd'

=item 2.

Edit 'Math-Simple.ppd'. Fill in AUTHOR and ABSTRACT if you wish. Then

=back

change:

      <CODEBASE HREF="" />

    to

      <CODEBASE HREF="Math-Simple.tar.gz" />

=over

=item 1.

Run:

    tar cvf Math-Simple.tar blib
    gzip --best Math-Simple.tar

=item 2.

Run:

    tar cvf Math-Simple-1.23.tar Math-Simple.ppd Math-Simple.tar.gz
    gzip --best Math-Simple-1.23.tar

=item 3.

Distribute Math-Simple-1.23.tar.gz with the following instructions:

=over

=item 1.

Run:

gzip -d Math-Simple-1.23.tar.gz tar xvzf Math-Simple-1.23.tar

=item 2.

Run 'ppm install Math-Simple.ppd'

=item 3.

Delete Math-Simple.tar and Math-Simple.ppd.

=item 4.

Test with:

perl -MMath::Simple -le 'print add(37, 42)'

=back

=back

That's it. The process should also work with zip instead of tar, but I
haven't tried it.

The recipient of the binary must have Perl built with a matching architecture.
Luckily, ppm will catch this.

For a binary dist B<with> C source code, simply omit steps 2, 3, 6, and 7.

If this seems too hard, then in a future version you should be able to
just type:

    make ppm

=head2 Why does C<C/t/09parser.t> fail on Cygwin ?

It doesn't always fail on Cygwin, but if you find that it produces "unable to
remap .... to same address as parent" errors during the build phase, then it's
time for you to run rebaseall.

See L<http://cygwin.com/faq/faq-nochunks.html#faq.using.fixing-fork-failures>
and, if needed, seek further help from the Cygwin mailing list.

=cut