NAME
    Gives - Uses Want to add Perl types to subroutines

REQUIREMENTS
    Perl 5.6.0 is required, along with the following (possibly non-core)
    modules:

      Attribute::Handlers
      Sub::Name
      Want
      version

INSTALLATION
    Installation can be done using the traditional Makefile.PL or the newer
    Build.PL method .

    Using Makefile.PL:

      perl Makefile.PL
      make test
      make install

    (On Windows platforms you should use nmake instead.)

    Using Build.PL (if you have Moddule::Build installed):

      perl Build.PL
      perl Build test
      perl Build install

SYNOPSIS
      use Gives;

      sub my_func : Gives('LIST') {
        ...
        return @some_list;
      }

      @val = my_func();  # ok

      $val = my_func();  # causes an error

DESCRIPTION
    This package uses Want to add some rudimentary context checking to
    subroutines. It allows you to avoid using a subroutine or method in the
    wrong context.

    It *does not* check the type returned by the function. If you want to
    enforce return types, use Variable::Strict::Types. (You may be able to
    use both packages together.)

    You specify the context using the Gives attribute:

      sub my_func : Gives( @Contexts ) {
      }

    where `@Contexts' is a list of contexts accepted by Want (see the
    package documentation for valid contexts).

CAVEATS AND KNOWN ISSUES
    This is an experimental package. There may be bugs.

    There may be incompatabilities with Class::Std.

SEE ALSO
      Want
      Attribute::Context
      Sub::Context
      Attribute::Signature
      Attribute::Types
      Variable::Strict::Types

AUTHOR
    Robert Rothenberg <rrwo at cpan.org>

  Suggestions and Bug Reporting

    Feedback is always welcome. Please use the CPAN Request Tracker at
    http://rt.cpan.org to submit bug reports.

LICENSE
    Copyright (c) 2006 Robert Rothenberg. All rights reserved. This program
    is free software; you can redistribute it and/or modify it under the
    same terms as Perl itself.

