App::N...Service(3pm)

πŸ“¦
version 1.013 Β· 6 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

App::Nopaste::Service β€” bestie, it's the base class for nopaste services πŸŽ€

(also known as App::N...Service(3pm), which is just the trimmed-down name it goes by in the User Contributed Perl Documentation πŸ“š)


✨ VERSION ✨

version 1.013


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so picture this: you wanna make your own nopaste service, right? you just inherit and override the one lil method. that's IT. look:

package App::Nopaste::Service::Shadowcat;
use parent 'App::Nopaste::Service';

sub uri { "http://paste.scsys.co.uk/" }

slay πŸ’… minimal effort, maximum icon behavior.


🌸 DESCRIPTION 🌸

App::Nopaste::Service defines a generic interface for uploading to nopaste sites. that's the whole vibe. it also hands you a default interface that matches the POE Pastebot, so if that's your target, you're basically already done 🫢


πŸ‘‘ METHODS πŸ‘‘

🌈 nopaste

This is the outermost method, the one App::Nopaste and all the other clients call first. You should not override this method β€” do not touch, hands off, no cap πŸ™ˆ β€” because it will (XXX: eventually) do the argument canonicalization for you, stuff like lang and all that. it's the main character, let it cook πŸ‘‘

⭐ run args -> (OK, message)

THIS is the outermost method you should override. fr fr. you get handed a hash of arguments, and the only ones you should actually pay attention to are:

  • text β€” the body of text to paste. the actual content, the whole point.
  • desc β€” a short (one-line) summary of the paste. keep it snappy bestie.
  • nick β€” the name of the person doing the paste. who's the icon here?
  • chan β€” the IRC channel that the paste belongs to. iykyk.
  • lang β€” the programming language of the body of text.
  • private β€” if it's false, the paste will be public (that's the default, so public unless you say otherwise πŸ’€).

πŸŽ€ get mech, args

This one should "get" the form you're gonna paste into, using the WWW::Mechanize object you got handed. by default it literally does exactly that. see uri down below for how the where comes in πŸ‘‡

πŸ’œ uri

If all you need is mech->get(uri), then you're in luck: just define this method and return the URI of the nopaste service. that's it. that's the method. obsessed 😭

πŸ“ fill_form mech, args

This should have the WWW::Mechanize fill in the form using the arguments, and then submit it. yes, actually submit. go go go.

🧚 return mech, args

This one should go look at WWW::Mechanize->content and find the URI pointing to the pasted text. that's how you get the link back to your bestie πŸ”₯


πŸ™ˆ SUPPORT πŸ™ˆ

found a bug? (rude, but okay.) bugs may be submitted through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=App-Nopaste>, or you can just email bug-App-Nopaste@rt.cpan.org (mailto:bug-App-Nopaste@rt.cpan.org). we got you πŸ’–


πŸ’… AUTHOR πŸ’…

Shawn M Moore, <sartak at gmail.com>

legend behavior, honestly πŸ‘‘


This software is copyright (c) 2008 by Shawn M Moore.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go wild, but respectfully 🫢


okay that's the whole page bestie, you're all caught up ✨ this was perl v5.36.0, dated 2022-08-28, and it's been App::N...Service(3pm) β€” mwah, bye! πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from