Pod::I...::Entry(3pm)

✨ Pod::I...::Entry(3pm) ✨

okay bestie, this is the page for Pod::I...::Entry from User Contributed Perl Documentation β€” it's a Perl module, and it is so much less scary than the name makes it look. sit down, grab a lil snack πŸ“, and let's get into it.


πŸ’– NAME πŸ’–

Pod::Index::Entry β€” it represents a Pod search result. that's it, that's the whole vibe. one lil object that holds one lil search hit. iconic honestly. ✨


🌸 SYNOPSIS 🌸

here's how you actually use it, no cap:

use Pod::Index::Entry;

my $entry =  Pod::Index::Entry->new(
    keyword  => 'constructors',
    podname  => 'perlobj',
    line     => 42,
    filename => '/usr/lib/perl5/5.8.7/pod/perlobj.pod',
    context  => 'Using POD',
);

# trivial accessors
my $podname  = $entry->podname;
my $filename = $entry->filename;
my $line     = $entry->line;
my $context  = $entry->context;
my $keyword  = $entry->keyword;

# extract the POD for this entry
my $pod      = $entry->pod;

see? build the entry, ask it stuff, pull the POD out. the whole character arc, right there. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this class represents a POD index entry. an entry is defined by the podname/filename, the line number, and the context. that's the trio, the main-character trio, the girl group of this module. πŸŽ€

and the entry object also has the ability to extract the POD "scope" from the filename. yes, ability. it's giving multi-talented. ✨


πŸ‘‘ METHODS πŸ‘‘

new

my $q = Pod::Index::Entry->new(%args);

Create a new search object. the possible arguments are, and listen carefully bestie because these are the receipts:

  • podname β€” the name of the pod, such as .
  • filename β€” the filename for the pod, such as Data/Dumper.pm.
  • line β€” the line number where the scope of this entry begins.
  • context β€” the title of the section that contains this entry.

podname Β· filename Β· line Β· context

these four? literally just simple accessors. they return the value of those properties, exactly as you gave them to the constructor. no plot twists, no surprises, just honest lil getters. 🫢


pod

Extracts the POD for the scope of the entry from $self->filename, beginning at $self->line. πŸ“

and if you wanna know what "scope" even means here, go read Pod::Index β€” it's all defined there. also important: the POD extraction itself is delegated to the Pod::Index::Extract module. it doesn't do the grunt work alone, it outsources. queen behavior. πŸ‘‘


⭐ VERSION ⭐

0.14


🌈 SEE ALSO 🌈

go read these next, fr fr:

  • Pod::Index
  • Pod::Index::Search
  • Pod::Index::Extract

πŸ’œ AUTHOR πŸ’œ

Ivan Tubert-Brohman <itub@cpan.org>


Copyright (c) 2005 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


okay that's the whole page bestie, you ate it, you understood it, periodt. πŸ’…βœ¨

and a lil sign-off from me to you: this page is perl v5.30.0, dated 2020-05-17, and it lives under the name Pod::I...::Entry(3pm). byeee πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from