Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: Using perl to script an upload page

by Aldebaran (Curate)
on Feb 02, 2023 at 06:23 UTC ( [id://11150086] : note . print w/replies, xml ) Need Help??

in reply to Re: Using perl to script an upload page
in thread Using perl to script an upload page

Though I personally take a different route, probably the easiest way is to create a new project on the website, leave the option "Initialize repository with a README" or similar enabled, and then do a git clone to get that repository onto the local machine, and then start working in this new directory, pushing changes up to the server as desired.

You know, haukex, I might read your posts ten times and still get something from them. I finally cottoned on to the whole git clone deal, and I'm able to move forward:

$ git clone wiki Cloning into 'wiki'... remote: Enumerating objects: 64, done. remote: Total 64 (delta 0), reused 0 (delta 0), pack-reused 64 Unpacking objects: 100% (64/64), done. $ ls 1.example.config.txt 1.txt 2.txt wiki $ cd wiki $ ls Using-Web $ cat These are **supplemental** notes on using WebPerl. Please see the main documentation at **< +ng.html>**. - Nothing here yet. $ pwd /home/pi/Documents/curate/perlmonks/trans/trans/trans/wiki $ ls Using-Web $ git clone --branch gh-pages pa +ges Cloning into 'pages'... remote: Enumerating objects: 1106, done. remote: Total 1106 (delta 0), reused 0 (delta 0), pack-reused 1106 Receiving objects: 100% (1106/1106), 6.15 MiB | 2.48 MiB/s, done. Resolving deltas: 100% (711/711), done. $ ls pages $ cd pages/ $ ls favicon.ico regex.html CNAME HD_WebPerl_GPW_2019_Slides.pdf _misc _config.yml HD_WebPerl_Riga_2019_Slides.pdf webperl.png democode $

Q1) How do I clone the rpi repo that I visit so much and now can't find?

I hadn't been in a position to follow webperl main page when you rolled it out. I remember that I had some crummy hosting arrangement at the time that didn't allow me to have sudo privileges, so I couldn't replicate much of any of it. Well, now is the dead of winter, and I have my perl feet under me now. I'm confident that if I typed:

plackup webperl.psgi

, your software would snap to attention and be ready for contact. So I have executed the cpanfile that was:

# $ cpanm --installdeps . requires 'Cpanel::JSON::XS'; requires 'Plack'; requires 'Plack::Middleware::CrossOrigin'; requires 'Plack::Middleware::Auth::Digest';

Q2) Is Plack the solution for my upload question?

I'm concerned that I see the date of 2009 at stackoverflow thread on psgi and advent.plackperl, but I'm hoping that means that it is well-seasoned rather than obsolete. I am encouraged to see the name Miyagawa on it. One comment from these sources:

I'm new in PSGI too, but zilion things now are much easier as before in my apache/mod_perl era. try write some apps with it and will find than Plack is like the first sex - now you didn't understand that you could live without it. ps: If was here something like "Perl Oscar", will sure nominating MyiagavaSan. :)

That's kind of the way I feel about:

cpanm --installdeps .

Again, thanks for your writeup....

Gruss aus Amiland,

Replies are listed 'Best First'.
Re^3: Using perl to script an upload page
by haukex (Archbishop) on Feb 04, 2023 at 09:32 UTC
    Q1) How do I clone the rpi repo that I visit so much and now can't find?

    My Raspberry Pi notes used to be in my "hgpstools" repository, and a few older notes are still there, but I've moved my main and most current Raspberry Pi notes to a separate repository, which is mirrored to GitHub: git clone

    Q2) Is Plack the solution for my upload question?

    Plack is somewhat lower-level, but still relevant, and though I haven't used it myself for this purpose, it is one way to handle file uploads. I would still recommend Mojolicious instead - I don't understand your previous comments about it: "... deployment size and simplicity is relevant. I don't need a lot of software here." Mojo isn't all too big, and only has very few non-core dependencies, so it really isn't that big of a deal, and what you get in exchange is a really good framework.