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

Dynamic generation of ... stuff #14

Open
shadowcat-mst opened this issue May 16, 2020 · 4 comments
Open

Dynamic generation of ... stuff #14

shadowcat-mst opened this issue May 16, 2020 · 4 comments
Labels
enhancement New feature or request Post-MVP Valuable issues outside the scope of the MVP

Comments

@shadowcat-mst
Copy link

I mean, logically, I guess I can eval up an entire class in a BEGIN block or something ... but it'd be nice to be able to generate two or three methods dynamically all the same.

Ideally, I'd be able to do 'method $name (...) { ... }' but '*name = method (...) { ... }' or some similar syntax would also be fine, I just want some way to be able to generate two or three methods in a foreach loop or similar (and I'd like to be able to do it for attributes as well, ideally).

If we want to be able to close the class at the end of the 'class { ... }' block I have no issue with having to do whatever I'm doing in a 'BEGIN { ... }' block inside the class block ... but I really do need some way to do that.

@Ovid Ovid added the enhancement New feature or request label May 16, 2020
@Ovid Ovid added the Post-MVP Valuable issues outside the scope of the MVP label Aug 15, 2021
@Ovid
Copy link
Collaborator

Ovid commented Aug 15, 2021

This might be possible via the MOP. I cannot say, but maybe @leonerd can?

Unless this is trivial, I'm marking this as Post-MVP.

@leonerd
Copy link
Collaborator

leonerd commented Aug 24, 2021

There's plenty of MOP thoughts already, in https://metacpan.org/pod/Object::Pad::MOP::Class and the related ::Slot and ::Method.

@Ovid
Copy link
Collaborator

Ovid commented Feb 20, 2022

Leaving this open because I suspect it will be relevant to @leonerd's work on the MOP.

@Ovid Ovid closed this as completed Feb 20, 2022
@Ovid
Copy link
Collaborator

Ovid commented Feb 20, 2022

Closed by accident,

@Ovid Ovid reopened this Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Post-MVP Valuable issues outside the scope of the MVP
Projects
None yet
Development

No branches or pull requests

3 participants