Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PPC0022] - Initial entry point as functions vs. constructor-methods #44

Open
leonerd opened this issue Jan 4, 2024 · 1 comment
Open

Comments

@leonerd
Copy link
Contributor

leonerd commented Jan 4, 2024

The original design had functions such as

my $metapkg = meta::get_package("some::name::here");

A suggestion from the mailing list was that these could instead be written as constructor-style methods on named packages within meta:

my $metapkg = meta::package->get("some::name::here");

Having implemented both now it feels actually a little nicer to use the latter style. Plus it conveniently gives a place to explain and document what actual class these meta-objects appear to be in.

If we think this style is better we should update the doc to match.

@rwp0
Copy link
Contributor

rwp0 commented Jan 4, 2024

Yeah, I always disliked get_OBJECT, set_OBJECT language, the shorter the better (with grouping).

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

No branches or pull requests

2 participants