This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
threads::shared 1.24 (more)
[perl5.git] / t / pod / special_seqs.t
CommitLineData
360aca43 1BEGIN {
9c6ed6d7
HS
2 use File::Basename;
3 my $THISDIR = dirname $0;
4 unshift @INC, $THISDIR;
360aca43
GS
5 require "testp2pt.pl";
6 import TestPodIncPlainText;
7}
8
9my %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash
10my $passed = testpodplaintext \%options, $0;
11exit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE};
12
13
14__END__
15
16
17=pod
18
19This is a test to see if I can do not only C<$self> and C<method()>, but
66aff6dd
GS
20also C<< $self->method() >> and C<< $self->{FIELDNAME} >> and
21C<< $Foo <=> $Bar >> without resorting to escape sequences. If
22I want to refer to the right-shift operator I can do something
23like C<<< $x >> 3 >>> or even C<<<< $y >> 5 >>>>.
360aca43 24
66aff6dd
GS
25Now for the grand finale of C<< $self->method()->{FIELDNAME} = {FOO=>BAR} >>.
26And I also want to make sure that newlines work like this
27C<<<
28$self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]
29>>>
360aca43
GS
30
31Of course I should still be able to do all this I<with> escape sequences
32too: C<$self-E<gt>method()> and C<$self-E<gt>{FIELDNAME}> and C<{FOO=E<gt>BAR}>.
33
34Dont forget C<$self-E<gt>method()-E<gt>{FIELDNAME} = {FOO=E<gt>BAR}>.
35
e9fdc7d2
GS
36And make sure that C<0> works too!
37
66aff6dd
GS
38Now, if I use << or >> as my delimiters, then I have to use whitespace.
39So things like C<<$self->method()>> and C<<$self->{FIELDNAME}>> wont end
40up doing what you might expect since the first > will still terminate
41the first < seen.
42
8a523ae0
JH
43Lets make sure these work for empty ones too, like C<< >> and C<< >> >>
44(just to be obnoxious)
45
360aca43 46=cut