@@ -6100,7 +6100,7 @@ Perl_newBINOP(pTHX_ I32 type, I32 flags, OP *first, OP *last)
61006100 ? 2 /* Otherwise, minimum of 2 hex digits */\
61016101 : NUM_HEX_CHARS(num)))))))
61026102
6103- /* To make evident, Configure with `-DDEBUGGING`, build, run
6103+ /* To make evident, Configure with `-DDEBUGGING`, build, run
61046104 * `./perl -Ilib -Dy t/op/tr.t`
61056105 */
61066106void
@@ -8223,13 +8223,11 @@ Perl_newPVOP(pTHX_ I32 type, I32 flags, char *pv)
82238223 return CHECKOP(type, pvop);
82248224}
82258225
8226- void
8227- Perl_package (pTHX_ OP *o)
8226+ STATIC void
8227+ S_set_package_name (pTHX_ OP *o)
82288228{
82298229 SV *const sv = cSVOPo->op_sv;
82308230
8231- PERL_ARGS_ASSERT_PACKAGE;
8232-
82338231 SAVEGENERICSV(PL_curstash);
82348232 save_item(PL_curstname);
82358233
@@ -8243,17 +8241,37 @@ Perl_package(pTHX_ OP *o)
82438241 op_free(o);
82448242}
82458243
8246- void
8247- Perl_package_version ( pTHX_ OP *v )
8244+ STATIC void
8245+ S_set_package_version ( pTHX_ OP *v )
82488246{
82498247 U32 savehints = PL_hints;
8250- PERL_ARGS_ASSERT_PACKAGE_VERSION;
8248+
82518249 PL_hints &= ~HINT_STRICT_VARS;
82528250 sv_setsv( GvSV(gv_fetchpvs("VERSION", GV_ADDMULTI, SVt_PV)), cSVOPx(v)->op_sv );
82538251 PL_hints = savehints;
82548252 op_free(v);
82558253}
82568254
8255+ /*
8256+ =for apidoc package
8257+
8258+ Function combines former C<package> and C<package_version> into single call.
8259+
8260+ Available since: v5.44
8261+
8262+ =cut
8263+ */
8264+
8265+ void
8266+ Perl_package (pTHX_ OP *o, OP *v)
8267+ {
8268+ PERL_ARGS_ASSERT_PACKAGE;
8269+
8270+ S_set_package_name (aTHX_ o);
8271+ if (v)
8272+ S_set_package_version (aTHX_ v);
8273+ }
8274+
82578275/* Extract the first two components of a "version" object as two 8bit integers
82588276 * and return them packed into a single U16 in the format of PL_prevailing_version.
82598277 * This function only ever has to cope with version objects already known
@@ -16846,7 +16864,7 @@ Perl_subsignature_append_positional(pTHX_ PADOFFSET padix, OPCODE defmode, OP *d
1684616864 signature->next_argix++;
1684716865
1684816866 if(!padix && !defexpr)
16849- /* This param has no var and no defaulting expression. There's
16867+ /* This param has no var and no defaulting expression. There's
1685016868 * nothing else for us to do here.
1685116869 */
1685216870 return;
0 commit comments