NAME

Sub::WrapInType::Attribute - attribute for Sub::WrapInType

SYNOPSIS

use Sub::WrapInType::Attribute;
use Types::Standard -types;

sub hello :WrapSub([Str] => Str) {
    my $message = shift;
    return "HELLO $message";
}

hello('world!!'); # => HELLO world!!
my $code = \&hello; # => Sub::WrapInType object

DESCRIPTION

This module provides attribute for Sub::WrapInType, which makes it easier to check during the compilation phase.

ATTRIBUTES

:WrapSub(\@parameter_types, $return_type)

The :WrapSub code attribute performs Sub::WrapInType#wrap_sub on the subroutine that specified this attribute.

:WrapMethod(\@parameter_types, $return_type)

The :WrapMethod code attribute performs Sub::WrapInType#wrap_method on the subroutine that specified this attribute.

SEE ALSO

Sub::WrapInType

LICENSE

Copyright (C) kfly8.

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

AUTHOR

kfly8 <kfly@cpan.org>