27 Jul 2018 17:58:13 UTC
- Distribution: Kavorka
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (2942 / 450 / 0)
- KwaliteeBus factor: 1
- 86.27% Coverage
- License: perl_5
- Perl: v5.14.0
- Activity24 month
- Download (77.93KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:20 non-PAUSE usersTOBYINK Toby Inkster
- SEE ALSO
- COPYRIGHT AND LICENCE
- DISCLAIMER OF WARRANTIES
Kavorka::Manual::PrototypeAndAttributes - the more rarely used features of Perl subroutines
Like with the sub keyword, a prototype may be provided for functions. Method dispatch ignores this, so it's only likely to be useful for
fun, and even then, rarely.
Like Function::Parameters, Kavorka uses
:(...)to indicate a prototype. This avoids ambiguity between signatures, prototypes and attributes.
For compatibility with Perl 5.20, the special attribute
:prototype(...)is supported as an alternative mechanism for expressing prototypes.
Attributes are parsed as per "Subroutine Attributes" in perlsub.
For anonymous functions, some attributes (e.g.
:lvalue) may be applied too late to take effect. Attributes should mostly work for named functions though.
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Kavorka.
Toby Inkster <firstname.lastname@example.org>.
This software is copyright (c) 2013-2014, 2017 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.