Icon::...m::Silk(3pm)

πŸ’– Icon::FamFamFam::Silk β€” the manual, but make it cute πŸ’–

okay bestie, so this is the page for Icon::FamFamFam::Silk, and it lives in the User Contributed Perl Documentation section. ngl the whole point of this module is iconic β€” literally. it's how you embed these famous little icons straight into your code. no files, no assets folder, just vibes ✨


🌸 NAME 🌸

Icon::FamFamFam::Silk β€” embed these famous icons in your code πŸ’…

like. the icons are in the code. they live there now. periodt.


πŸŽ€ VERSION πŸŽ€

0.002001003

(that's version 0.002 of this module, and version 1.3 of the icons, if you were wondering what all those numbers were doing πŸ’€)


✨ SYNOPSIS ✨

two ways to do the thing. both slay. pick your fighter:

use Icon::FamFamFam::Silk;
my $wrench = Icon::FamFamFam::Silk->new('wrench_orange');
print $wrench->base64;

or, if you're feeling lowkey minimal:

use Icon::FamFamFam::Silk;
print Icon::FamFamFam::Silk::base64('wrench_orange');

see? a wrench. orange. in your output. you're welcome 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: all of these methods can be called as functions β€” you just hand them the name of the icon as a string β€” or they can be called as object methods on an icon object you've already instantiated. (peep the "SYNOPSIS" if you skipped it, no judgment… okay a little judgment πŸ™ˆ)

  • Icon::FamFamFam::Silk->new($name) β€” returns a blessed icon object. that's it, that's the whole job. blessed and everything 🧚
  • Icon::FamFamFam::Silk->list β€” returns a list of all the icons. every single one. the whole roster πŸ‘‘
  • $icon->name β€” returns the name of the icon. yes, it just tells you its name back. main character behaviour honestly.
  • $icon->base64 β€” returns base64-encoded PNG data. this is the one you'll be printing into your HTML like it's nothing πŸ’…
  • $icon->raw β€” returns raw PNG data. unencoded, unfiltered, straight-up bytes πŸ”₯
  • $icon->uri β€” returns a data: URI for the icon. so you can yeet it directly into a src and never think about it again.
  • $icon->attribution_data =item Icon::FamFamFam::Silk->attribution_data β€” returns a hash of data that's useful for giving credit to Mark James. (and yeah, that stray =item in there is exactly how the original page has it. we don't fix, we preserve. iykyk πŸ’€)

the format is suitable for passing to HTML::HTML5::Builder's CREATIVE_COMMONS function, should you want to do something like that. no pressure, just options bestie 🌈


😭 BUGS 😭

please report any bugs to <http://rt.cpan.org/>. do it nicely, the maintainers are people too πŸ’–


🌈 SEE ALSO 🌈

<http://famfamfam.com/lab/icons/silk/>. go look. it's the source of all this beauty. not me linking it in my own manual like a stan πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

icons by Mark James of <http://famfamfam.com/>. an absolute legend, no cap.

module by Toby Inkster <tobyink@cpan.org>. also iconic, also responsible for the Perl half of this situation.


okay listen, this part actually matters so pay attention:

Mark James distributes the icons themselves under the CC-BY 3.0 licence <http://creativecommons.org/licenses/by/3.0/>. so β€” and this is the important bit β€” applications using Icon::FamFamFam::Silk (even indirectly via another module) MUST provide credit. not "should", not "it'd be nice if", must. do not be the person who skips the credit. we don't do that here 🚫

including a link to <http://famfamfam.com/lab/icons/silk/> in the documentation of the application is probably sufficient. easy. just do that. free good karma ✨

Toby Inkster releases the additional Perl coding into the Public Domain. chef's kiss πŸŽ€


πŸ’œ DISCLAIMER OF WARRANTIES πŸ’œ

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

(that's the legal voice, not mine β€” she's dramatic but she means it 😭)


aaaand that's the page!! this one's from perl v5.32.0, dated 2021-01-06, and it's filed under Icon::...m::Silk(3pm) in the User Contributed Perl Documentation. go forth and embed icons, bestie πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from