This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Missing thingies.
[perl5.git] / pp_hot.c
index 5f23bb3..208d89b 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -901,15 +901,7 @@ PP(pp_rv2hv)
     }
     else if (gimme == G_SCALAR) {
        dTARGET;
-       if (SvRMAGICAL(hv) && mg_find((SV *)hv, PERL_MAGIC_tied))
-           Perl_croak(aTHX_ "Can't provide tied hash usage; "
-                      "use keys(%%hash) to test if empty");
-       if (HvFILL(hv))
-            Perl_sv_setpvf(aTHX_ TARG, "%"IVdf"/%"IVdf,
-                          (IV)HvFILL(hv), (IV)HvMAX(hv) + 1);
-       else
-           sv_setiv(TARG, 0);
-       
+    TARG = Perl_hv_scalar(aTHX_ hv);
        SETTARG;
     }
     RETURN;
@@ -967,7 +959,8 @@ PP(pp_aassign)
     I32 i;
     int magic;
     int duplicates = 0;
-    SV **firsthashrelem;
+    SV **firsthashrelem = 0;   /* "= 0" keeps gcc 2.95 quiet  */
+
 
     PL_delaymagic = DM_DELAY;          /* catch simultaneous items */
     gimme = GIMME_V;
@@ -1567,7 +1560,9 @@ Perl_do_readline(pTHX)
     for (;;) {
        PUTBACK;
        if (!sv_gets(sv, fp, offset)
-           && (type == OP_GLOB || SNARF_EOF(gimme, PL_rs, io, sv)))
+           && (type == OP_GLOB
+               || SNARF_EOF(gimme, PL_rs, io, sv)
+               || PerlIO_error(fp)))
        {
            PerlIO_clearerr(fp);
            if (IoFLAGS(io) & IOf_ARGV) {