IO::All::FTP(3pm)

πŸ’– IO::All::FTP πŸ’–

okay bestie, so you know that page IO::All::FTP(3pm)? the one from the User Contributed Perl Documentation era? yeah. that one. it's giving "tiny module, big vibes" and honestly we're obsessed.


✨ NAME ✨

IO::All::FTP β€” it extends IO::All to FTP URLs πŸ¦‹ like that's literally its whole thing and it eats every time.


🌸 SYNOPSIS 🌸

no notes, just look at her:

use IO::All;

"hello world\n" > io('ftp://localhost/test/x');  # save to FTP
io('ftp//example.org/pub/xyz') > io('xyz');      # GET to file

# two ways of getting a file with a password:
$content < io('ftp://me:secret@example.org/xyz');
$content < io('ftp://example.org/xyz')->user('me')->password('secret');

two whole ways to do the password thing?? periodt. pick whichever one is your main character today πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

so this module extends IO::All so it can handle FTP URLs. and here's the tea, bestie: you do NOT have to use it explicitly. it gets autoloaded by IO::All any time IO::All sees something that looks like an FTP URL. it just shows up. no invite needed. iconic behavior fr fr ✨


πŸ‘‘ METHODS πŸ‘‘

this is a subclass of IO::All::LWP, okay? and the only new method is "ftp".

  • you can use "ftp" to create a blank IO::All::FTP object 🫢
  • or it can also take an FTP URL as a parameter
  • and ngl, in most cases it's simpler to just call io('ftp//example.com'), which calls the "ftp" method automatically for you 😌

lowkey convenient, highkey slay.


πŸ’… OPERATOR OVERLOADING πŸ’…

same operators from IO::All, bestie β€” nothing new to memorize:

  • < GETs an FTP URL
  • > PUTs to an FTP URL

that's it. that's the whole vibe check. 🌈


⭐ SEE ALSO ⭐

go read these too, they're the friend group:

  • IO::All::LWP
  • IO::All
  • LWP

πŸ¦‹ AUTHORS πŸ¦‹

Ivan Tubert-Brohman <itub@cpan.org> and Brian Ingerson <ingy@cpan.org> β€” absolute legends, we stan πŸ₯°


Copyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>


πŸŽ€ okay that's the whole page, bestie! this lil cutie is living in perl v5.32.0, dated 2021-01-04, under the User Contributed Perl Documentation umbrella πŸ’– thanks for reading, mwah πŸ’‹
πŸ“¦ where this page comes from