Collect some stats during compile process.
[p5sagit/p5-mst-13.2.git] / pp_pack.c
index 705ee12..03bf3c8 100644 (file)
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -1,6 +1,6 @@
 /*    pp_pack.c
  *
- *    Copyright (c) 1991-2001, Larry Wall
+ *    Copyright (c) 1991-2002, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -922,6 +922,8 @@ PP(pp_unpack)
            }
            break;
        case 'P':
+           if (star)
+               DIE(aTHX_ "P must have an explicit size");
            EXTEND(SP, 1);
            if (sizeof(char*) > strend - s)
                break;
@@ -1841,7 +1843,7 @@ PP(pp_pack)
            fromstr = NEXTFROM;
            aptr = SvPV(fromstr, fromlen);
            SvGROW(cat, fromlen * 4 / 3);
-           if (len <= 1)
+           if (len <= 2)
                len = 45;
            else
                len = len / 3 * 3;