Rhesa Rozendaal > Method-Signatures-Simple-0.03 > Method::Signatures::Simple

Download:
Method-Signatures-Simple-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  4
Open  1
View/Report Bugs
Module Version: 0.03   Source   Latest Release: Method-Signatures-Simple-1.07

NAME ^

Method::Signatures::Simple - Basic method declarations with signatures, without source filters

VERSION ^

Version 0.03

SYNOPSIS ^

    use Method::Signatures::Simple;

    method foo { $self->bar }

    # with signature
    method foo($bar, %opts) {
        $self->bar(reverse $bar) if $opts{rev};
    }

    # attributes
    method foo : lvalue { $self->{foo} }

    # change invocant name
    method foo ($class: $bar) { $class->bar($bar) }

RATIONALE ^

This module provides a basic method keyword with simple signatures. It's intentionally simple, and is supposed to be a stepping stone for its bigger brothers MooseX::Method::Signatures and Method::Signatures. It only has a small benefit over regular subs, so if you want more features, look at those modules. But if you're looking for a small amount of syntactic sugar, this might just be enough.

FEATURES ^

AUTHOR ^

Rhesa Rozendaal, <rhesa at cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-method-signatures-simple at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Method-Signatures-Simple. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Method::Signatures::Simple

You can also look for information at:

ACKNOWLEDGEMENTS ^

SEE ALSO ^

Devel::Declare, Method::Signatures, MooseX::Method::Signatures.

COPYRIGHT & LICENSE ^

Copyright 2008 Rhesa Rozendaal, all rights reserved.

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

syntax highlighting: