Skip to content

Conversation

happy-barney
Copy link

@happy-barney happy-barney commented Oct 12, 2025

Internal changes - move duplicated code into dedicated functions.

  • This set of changes does not require a perldelta entry.

embed.fnc Outdated
Comment on lines 2489 to 2490
p |void |package_v544 |NN OP *o \
|NULLOK OP *v
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be called "package2()" if you're going for a non-descriptive new name.

Otherwise package_with_version() or package_and_version() seem more reasonable then either.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, that's what I forgot in PR message ... updated.

Honestly, I prefer API version in another version of function - it clearly says when it was added without need to consult additional tools (which in fact are not aware of semantics)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tonycoz Perl_package changed, original functions are now static and new function remains package

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename S_package (maybe S_package_named) to keep the base name distinct from Perl_package.

@tonycoz
Copy link
Contributor

tonycoz commented Oct 19, 2025

Documentation build warnings:

'new_block_statement' missing 'd' flag at embed.fnc, line 2292 at autodoc.pl line 2784.
'package' missing 'd' flag at embed.fnc, line 2562 at autodoc.pl line 2784.

@happy-barney
Copy link
Author

@tonycoz done

Branislav Zahradník added 2 commits October 20, 2025 11:22
Function combines call of original `package` and `package_version` when
new namespace statement is detected.

Instead of required three statements usage now consists of single function call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants