-
Notifications
You must be signed in to change notification settings - Fork 602
Open
Description
Description
A =cut outside of an actual section of pod causes the parser to switch into pod mode. This is technically correct, according to the docs:
A Pod block starts with any command paragraph
but this behavior for =cut seems counterintuitive.
(As to why a lone =cut might be there; I have a here-doc containing snippets of pod, and podspell gets confused and doesn't know when the pod ends).
Steps to Reproduce
This code
sub foo {
=cut
}
produces
Missing right curly or square bracket at foo.pl line 7, at end of line
syntax error at foo.pl line 7, at EOF
foo.pl had compilation errors.
Expected behavior
I expected the parser to recognize that the =cut was a no-op.
Perl configuration
Summary of my perl5 (revision 5 version 40 subversion 3) configuration:
Platform:
osname=linux
osvers=6.12.33+deb12-amd64
archname=x86_64-linux
uname='linux leafhopper 6.12.33+deb12-amd64 #1 smp preempt_dynamic debian 6.12.33-1~bpo12+1 (2025-07-09) x86_64 gnulinux '
config_args='-Dprefix=/home/dj/.plenv/versions/5.40.3 -de -Dversiononly -A'eval:scriptdir=/home/dj/.plenv/versions/5.40.3/bin''
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='cc'
ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O2'
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='12.2.0'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib /usr/lib64
libs=-lpthread -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
libc=/lib/x86_64-linux-gnu/libc.so.6
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.36'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_LONG_DOUBLE
HAS_STRTOLD
HAS_TIMES
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_SIPHASH13
PERL_HASH_USE_SBOX32
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Aug 6 2025 22:51:11
%ENV:
PERL_CPANM_OPT="--cascade-search --mirror-only --mirror /home/dj/Work/darkpan --mirror http://www.cpan.org"
PERL_CPAN_MIRROR_TINY_BASE="/home/dj/Work/darkpan"
PERL_DARKPAN="/home/dj/Work/darkpan"
@INC:
/home/dj/.plenv/versions/5.40.3/lib/perl5/site_perl/5.40.3/x86_64-linux
/home/dj/.plenv/versions/5.40.3/lib/perl5/site_perl/5.40.3
/home/dj/.plenv/versions/5.40.3/lib/perl5/5.40.3/x86_64-linux
/home/dj/.plenv/versions/5.40.3/lib/perl5/5.40.3
Metadata
Metadata
Assignees
Labels
No labels