in reply to Re^4: Standard method for documenting AUTOLOAD methods in pod
in thread Standard method for documenting AUTOLOAD methods in pod

I would try document the behaviour. Maybe something like:

=head1 Handling of file classification For every file category as found via C<< ->find_categories >>, the module provides a function C<< find_FILE_CATEGORY_files >>. In the below example, the C<< get_cats_files(...) >> function returns all files in the C<< cats >> category: my $cat = find_category_for_file( 'myfile_cats.txt' ); # cats print for get_cats_files('/*'); # myfile_cats.txt myfile2_cats.txt ...

Personally, while AUTOLOAD is enticing, why not make the category a real parameter instead? Otherwise, the programmers will have no good way of passing an arbitrary category to your code.

Replies are listed 'Best First'.
Re^6: Standard method for documenting AUTOLOAD methods in pod
by nysus (Parson) on Sep 03, 2019 at 09:25 UTC

    That's a good question and I didn't even think of that. My AUTOLOAD sub has kind of morphed over time and I'm not even sure I need it now other than: $self->get_good_files->do->run_method;

    is a little easier on the eyes than: $self->get_files("good")->do->run_method;

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks