Perl / Perl/PPCs

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

Open
#44 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
79
Forks
28
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the two entry-point forms shown in the issue and the surrounding proposal documentation. Confirm which style should be adopted and document the meta-object class and constructor-style usage; no specific file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.