This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use isGV_with_GP in vms/vms.c for better glob recognition.
authorCraig A. Berry <craigberry@mac.com>
Sun, 3 Oct 2010 22:41:58 +0000 (17:41 -0500)
committerCraig A. Berry <craigberry@mac.com>
Sun, 3 Oct 2010 22:45:54 +0000 (17:45 -0500)
Suggested by Father Chrysostomos in:

[perl #77500] VMS::Filespec and PVLV globs

Affected routines are candelete_fromperl and rmscopy_from_perl.

vms/vms.c

index db686d2..9ca1e96 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -13452,7 +13452,7 @@ candelete_fromperl(pTHX_ CV *cv)
   mysv = SvROK(ST(0)) ? SvRV(ST(0)) : ST(0);
   Newx(fspec, VMS_MAXRSS, char);
   if (fspec == NULL) _ckvmssts(SS$_INSFMEM);
-  if (SvTYPE(mysv) == SVt_PVGV) {
+  if (isGV_with_GP(mysv)) {
     if (!(io = GvIOp(mysv)) || !PerlIO_getname(IoIFP(io),fspec)) {
       set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG);
       ST(0) = &PL_sv_no;
@@ -13493,7 +13493,7 @@ rmscopy_fromperl(pTHX_ CV *cv)
 
   mysv = SvROK(ST(0)) ? SvRV(ST(0)) : ST(0);
   Newx(inspec, VMS_MAXRSS, char);
-  if (SvTYPE(mysv) == SVt_PVGV) {
+  if (isGV_with_GP(mysv)) {
     if (!(io = GvIOp(mysv)) || !PerlIO_getname(IoIFP(io),inspec)) {
       set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG);
       ST(0) = sv_2mortal(newSViv(0));
@@ -13512,7 +13512,7 @@ rmscopy_fromperl(pTHX_ CV *cv)
   }
   mysv = SvROK(ST(1)) ? SvRV(ST(1)) : ST(1);
   Newx(outspec, VMS_MAXRSS, char);
-  if (SvTYPE(mysv) == SVt_PVGV) {
+  if (isGV_with_GP(mysv)) {
     if (!(io = GvIOp(mysv)) || !PerlIO_getname(IoIFP(io),outspec)) {
       set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG);
       ST(0) = sv_2mortal(newSViv(0));