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

Modulinos? #85

Closed
mohawk2 opened this issue Jul 5, 2020 · 5 comments
Closed

Modulinos? #85

mohawk2 opened this issue Jul 5, 2020 · 5 comments

Comments

@mohawk2
Copy link
Contributor

mohawk2 commented Jul 5, 2020

It seems to me all the PPTs should be modulinos?

@briandfoy
Copy link
Owner

That would complicate things quite a bit. These should be single file things that people can grab individually.

@mohawk2
Copy link
Contributor Author

mohawk2 commented Aug 8, 2020

It seems I don't understand modulinos, then. I thought that described Perl code that could be grabbed individually and just run as a command-line script, but if loaded into another program would make its "main" function instead be callable? The changes required to implement this would mostly involve inserting package PerlPowerTools::cat_or_whatever; sub main { and } and a main(@ARGV) unless caller.

If that understanding were correct, then the various scripts in this distro could also be utilised by e.g. pure-perl-make to avoid calling the shell at all for supported tasks, which would make things much faster, particularly on Windows. Spoiler: I am in fact intending to make pure-perl-make do that. I'd hoped these scripts would make that easy.

Can you help me understand why this would be complicated?

@briandfoy
Copy link
Owner

Ah, I see what you are saying. I guess that could work if someone wanted to do the work. But, the tests still need to check them as scripts.

If you'd like to do that, pick one program and let's try it out.

@briandfoy briandfoy reopened this Aug 8, 2020
@mohawk2
Copy link
Contributor Author

mohawk2 commented Aug 12, 2020

Of course you're right that starting with one is a good idea.

My approximate plan will be to start also from using https://metacpan.org/pod/Modulino::Demo, while also probably making a small test framework that makes testing the scripts/modules much easier: I'm thinking of a data-driven approach allowing one to just express fixtures and test-cases, that would run the tests against both the script incarnation and the module incarnation with no extra effort.

@briandfoy
Copy link
Owner

I'm not closing this as a rejection. I've answered the question and if you want to move forward, send a PR. Just don't go crazy with frameworks and such though :)

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