summaryrefslogtreecommitdiff
path: root/cpan/perlfaq
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2016-10-22 13:55:48 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2016-11-11 16:27:20 +0100
commit3d7c117d5246fe5390f3fda7bd31308799d54201 (patch)
tree25ed91492a78660a701502955918ad1c0a5737bc /cpan/perlfaq
parent32db2dd39faf0a339c2c26769b98a1924ca09892 (diff)
downloadperl-3d7c117d5246fe5390f3fda7bd31308799d54201.tar.gz
Patch unit tests to explicitly insert "." into @INC when needed.
require calls now require ./ to be prepended to the file since . is no longer guaranteed to be in @INC.
Diffstat (limited to 'cpan/perlfaq')
-rw-r--r--cpan/perlfaq/lib/perlfaq5.pod4
-rw-r--r--cpan/perlfaq/lib/perlfaq8.pod2
2 files changed, 3 insertions, 3 deletions
diff --git a/cpan/perlfaq/lib/perlfaq5.pod b/cpan/perlfaq/lib/perlfaq5.pod
index 22e88b8dd9..239f92a530 100644
--- a/cpan/perlfaq/lib/perlfaq5.pod
+++ b/cpan/perlfaq/lib/perlfaq5.pod
@@ -1278,7 +1278,7 @@ comes with Perl tries to convert C include files to Perl code, which
can be C<require>d. FIONREAD ends up defined as a function in the
I<sys/ioctl.ph> file:
- require 'sys/ioctl.ph';
+ require './sys/ioctl.ph';
$size = pack("L", 0);
ioctl(FH, FIONREAD(), $size) or die "Couldn't call ioctl: $!\n";
@@ -1378,7 +1378,7 @@ used for things that Perl opened itself, even if it was a dup of a
numeric descriptor as with C<MHCONTEXT> above. But if you really have
to, you may be able to do this:
- require 'sys/syscall.ph';
+ require './sys/syscall.ph';
my $rc = syscall(SYS_close(), $fd + 0); # must force numeric
die "can't sysclose $fd: $!" unless $rc == -1;
diff --git a/cpan/perlfaq/lib/perlfaq8.pod b/cpan/perlfaq/lib/perlfaq8.pod
index 3431417163..42b27ab127 100644
--- a/cpan/perlfaq/lib/perlfaq8.pod
+++ b/cpan/perlfaq/lib/perlfaq8.pod
@@ -239,7 +239,7 @@ and in pixels:
This is more portable than the raw C<ioctl>, but not as
illustrative:
- require 'sys/ioctl.ph';
+ require './sys/ioctl.ph';
die "no TIOCGWINSZ " unless defined &TIOCGWINSZ;
open(my $tty_fh, "+</dev/tty") or die "No tty: $!";
unless (ioctl($tty_fh, &TIOCGWINSZ, $winsize='')) {