(W unopened) You tried to close a filehandle that was never opened.
+=item closedir() attempted on invalid dirhandle %s
+
+(W io) The dirhandle you tried to close is either closed or not really
+a dirhandle. Check your control flow.
+
=item Code missing after '/'
(F) You had a (sub-)template that ends with a '/'. There must be another
(W syntax) You wrote your assignment operator backwards. The = must
always comes last, to avoid ambiguity with subsequent unary operators.
+=item rewinddir() attempted on invalid dirhandle %s
+
+(W io) The dirhandle you tried to do a rewinddir() on is either closed or not
+really a dirhandle. Check your control flow.
+
=item Runaway format
(F) Your format contained the ~~ repeat-until-blank sequence, but it
(W unopened) You tried to use the seek() or sysseek() function on a
filehandle that was either never opened or has since been closed.
+=item seekdir() attempted on invalid dirhandle %s
+
+(W io) The dirhandle you are doing a seekdir() on is either closed or not
+really a dirhandle. Check your control flow.
+
=item select not implemented
(F) This machine doesn't implement the select() system call.
(W unopened) You tried to use the tell() function on a filehandle that
was either never opened or has since been closed.
+=item telldir() attempted on invalid dirhandle %s
+
+(W io) The dirhandle you tried to telldir() is either closed or not really
+a dirhandle. Check your control flow.
+
=item That use of $[ is unsupported
(F) Assignment to C<$[> is now strictly circumscribed, and interpreted
GV * const gv = (GV*)POPs;
register IO * const io = GvIOn(gv);
- if (!io || !IoDIRP(io))
- goto nope;
+ if (!io || !IoDIRP(io)) {
+ if(ckWARN(WARN_IO)) {
+ Perl_warner(aTHX_ packWARN(WARN_IO),
+ "telldir() attempted on invalid dirhandle %s", GvENAME(gv));
+ }
+ goto nope;
+ }
PUSHi( PerlDir_tell(IoDIRP(io)) );
RETURN;
GV * const gv = (GV*)POPs;
register IO * const io = GvIOn(gv);
- if (!io || !IoDIRP(io))
- goto nope;
-
+ if (!io || !IoDIRP(io)) {
+ if(ckWARN(WARN_IO)) {
+ Perl_warner(aTHX_ packWARN(WARN_IO),
+ "seekdir() attempted on invalid dirhandle %s", GvENAME(gv));
+ }
+ goto nope;
+ }
(void)PerlDir_seek(IoDIRP(io), along);
RETPUSHYES;
GV * const gv = (GV*)POPs;
register IO * const io = GvIOn(gv);
- if (!io || !IoDIRP(io))
+ if (!io || !IoDIRP(io)) {
+ if(ckWARN(WARN_IO)) {
+ Perl_warner(aTHX_ packWARN(WARN_IO),
+ "rewinddir() attempted on invalid dirhandle %s", GvENAME(gv));
+ }
goto nope;
-
+ }
(void)PerlDir_rewind(IoDIRP(io));
RETPUSHYES;
nope:
GV * const gv = (GV*)POPs;
register IO * const io = GvIOn(gv);
- if (!io || !IoDIRP(io))
- goto nope;
-
+ if (!io || !IoDIRP(io)) {
+ if(ckWARN(WARN_IO)) {
+ Perl_warner(aTHX_ packWARN(WARN_IO),
+ "closedir() attempted on invalid dirhandle %s", GvENAME(gv));
+ }
+ goto nope;
+ }
#ifdef VOID_CLOSEDIR
PerlDir_close(IoDIRP(io));
#else