Devel:...terface(3pm)

πŸ“¦
version 0.021 Β· 5 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Devel::Declare::Interface πŸ’–

okay bestie, gather round, because we're talking about Devel::Declare::Interface β€” that's the 3pm Perl module, from the User Contributed Perl Documentation crew, and it's literally the interface to Devel-Declare parsers. yes that's the whole vibe. πŸ’…


✨ NAME ✨

Devel::Declare::Interface β€” Interface to Devel-Declare parsers. πŸŽ€


🌸 DESCRIPTION 🌸

So like. It's a higher level interface to Devel-Declare. That's it, that's the whole thing, and also that's why it matters: this is the package you will interact with the most when using Devel::Declare::Parser. πŸ‘‘

no cap, this is your main character package. πŸ’œ


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole thing, verbatim, because we do not mess with code in this house:

package My::Keyword::Method;
use strict;
use warnings;

use Devel::Declare::Parser;

# Look at Exporter-Declare to have most of this done for you.
sub import {
    my $class = shift;
    my $destination = caller;

    enhance( $destination, "make_method", "method" );
    no strict 'refs';
    *{ $destination . '::make_method' } = \&my_keyword;
}

sub make_method {
    my ( $name, $code ) = @_;
    my $dest = caller;
    no strict 'refs';
    *{ $destination . '::' . $name } = $code;
}

1;

like look at her go. 🧚✨


⭐ API ⭐

The following functions are all exported by default. you don't gotta ask, they just show up. 🫢

register_parser( $name ) / register_parser( $name, $class )

  • Register a parser under a short name. If $class is not provided, caller will be used. that's the default, bestie, don't come for me. πŸ’–

get_parser( $name );

  • Get the parser class by short name. that's it. that's the function. slay. πŸ’…

enhance( $dest_class, $name, $parser ) / enhance( $dest_class, $name, $parser, $type )

  • Make $name a keyword in $dest_class that uses $parser. $parser can be a short name or a class name. and $type? it defaults to 'const'. periodt. ⭐

🐱 FENNEC PROJECT 🐱

This module is part of the Fennec project. See Fennec for more details. Fennec is a project to develop an extendable and powerful testing framework. Together the tools that make up the Fennec framework provide a potent testing environment. πŸ”₯

The tools provided by Fennec are also useful on their own. Sometimes a tool created for Fennec is useful outside the greator framework. Such tools are turned into their own projects. This is one such project. πŸ¦‹

  • Fennec - The core framework
    • The primary Fennec project that ties them all together.

it's giving "found family of testing tools" honestly. πŸ˜­πŸ’–


πŸ‘‘ AUTHORS πŸ‘‘

Chad Granum exodist7@gmail.com 🌈


Copyright (C) 2010 Chad Granum

Devel-Declare-Interface is free software; Standard perl licence. πŸ’œ

Devel-Declare-Parser is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.

bestie that's the legal part, it's not a vibe check, it's a real warning. no cap. 🫢

and that's the whole page, gorgeous. ✨ This one's from perl v5.36.0, dated 2023-10-26, and it lives in the Devel:...terface(3pm) manual β€” go forth and parse some Devel-Declare, you absolute icon. πŸŽ€πŸ’…πŸ¦‹

πŸ“¦ where this page comes from