💾 Archived View for sdf.org › peteyboy › coding › perl › perl.gmi captured on 2024-05-12 at 15:14:48. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-03-21)
-=-=-=-=-=-=-
Over the past few years, I've decided to finally practice programming in perl.
First, I had an idea for a little goof that I was curious about when I noticed that the wordle score with the 5x5 boxes sort of looked like gliders from the game/programming exercise, Conway's Life.
So I learned enough perl to make a CGI script that I figured that I could put on SDF. I learned some more modern CGI with templates and that was data safe. But it turns out, because SDF had switched to nginx as a web browser, that it was much more complicated than making a old-style CGI. Mojolicous and plack didn't work, because they depend on app servers sitting behind the webserver, AND it turns out that nginx at SDF was not set up to pass path_info to CGI. SO nothing I wanted to do worked.
I had to figure out a thing that did work, which was a module called "CGI::Tiny", which ended up working, and I figured a way to mock up my own path_info in my script. So that is how the Wordle-Life project was born, at https://git.sdf.org/peteyboy/wordle-life.cgi
Later, I rewrote it a bit using Mojolicious and set it up to run on a VPS on a perl mojolicious server. It was a funner exercise, to be honest, and cool to run my own custom web server.
THEN, more recently, I had a different idea. Someone posted a Mastodon toot someone made about a website called nightfall.city, sort of a smolnet thing, with its own simple nc/TCP based "protocol", Nightfall Express, or NEX (nex://)
I sat down and put together my own client, using perl, and using the telnet and Curses modules, so I could make a terminal based, yet windowed app. It was way more work than I thought, and I got a little obsessed with it, but I did get it done, and it's honestly kind of cool.
I tried to package my nightfall.city NEX protocol browser. It's just a script, but it does have dependencies, and if I want someone else to use it, their perl environment needs to be set up, and you can't have it so complicated as loading each module with cpanm. I figured I needed to make a distribution package to load these items.
I ended up trying to use Module::Build::Tiny via App::ModuleBuildTiny