Aspect...ctions(3pm)

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

✨ NAME ✨

okay bestie, welcome to the manual page for Aspect::Point::Functions β€” page tag Aspect...ctions(3pm) if you're squinting at the header πŸ’…. She lives on the User Contributed Perl Documentation shelf, and she's here to let point context methods be called as functions. Yes, functions. We're doing keyword-core now ✨.

Aspect::Point::Functions β€” allow point context methods to be called as functions.


πŸ¦‹ SYNOPSIS πŸ¦‹

load it like this, bestie:

         use Aspect::Point::Functions;

         # This code is equivalent to the SYNOPSIS for Aspect::Point
         my $advice_code = sub {
             print type;           # The advice type ('before')
             print pointcut;       # The matching pointcut ($pointcut)
             print enclosing;      # Access cflow pointcut advice context
             print sub_name;       # The full package_name::sub_name
             print package_name;   # The package name ('Person')
             print short_name;     # The sub name (a get or set method)
             print self;           # 1st parameter to the matching sub
             print (args)[1];      # 2nd parameter to the matching sub
             original->( x => 3 ); # Call matched sub independently
             return_value(4)       # Set the return value
         };

πŸ’… DESCRIPTION πŸ’…

In AspectJ β€” the Java toolkit that Aspect took inspo from β€” the join point context information is retrieved through certain keywords. Very keyword-coded. Very demure.

In Aspect, that initially proved too difficult to achieve without heavy source code rewriting, so an alternative approach was taken instead: a topic object and methods. That's the lore.

This experimental package attempts to implement the original function/keyword style of call. Cute, right? Experimental is literally in the description, so bestie, clock that tea.

It is considered unsupported at this time. So like, don't build your whole production on it. It's giving experimental, not giving stable. 🫢

πŸ‘‘ AUTHORS πŸ‘‘

Written by Adam Kennedy <adamk@cpan.org> πŸ’–


Copyright 2011 Adam Kennedy.

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


πŸ’– mwah! this page was served by perl v5.36.0, dated 2023-07-02, under the Aspect...ctions(3pm) tag. stay iconic, bestie πŸ’…βœ¨

πŸ“¦ where this page comes from