home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / t / pod / special_seqs.t < prev    next >
Text File  |  2000-02-21  |  1KB  |  44 lines

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