Export-Attrs

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Export-Attrs

v0.1.0  2016-02-12 20:08:54 EET
	- Based on Perl6::Export::Attrs 0.000005.
	- Renamed to Export::Attrs.
	- Migrate to Dist::Milla.
	- Fix a 0.000004 regression in exporting subroutines.

0.000005 2015-11-24 09:16:01
	- Added dependency for PadWalker
	  (thanks Dave!)

0.000004 2015-10-03 12:42:22
	- Added export of package variables.
	- Fixed filtering of args to IMPORT block (thanks Smylers)
	- Updated docs to explain the syntactic constraints of the
	  IMPORT block (thanks Smylers)
	- Updated docs to note incompatibility with Memoize.pm
	  (thanks David)
	- Included META files

META.json  view on Meta::CPAN

         }
      },
      "develop" : {
         "requires" : {
            "Dist::Milla" : "v1.0.15",
            "Test::Pod" : "1.41"
         }
      },
      "runtime" : {
         "requires" : {
            "PadWalker" : "0"
         }
      },
      "test" : {
         "requires" : {
            "Test::More" : "0"
         }
      }
   },
   "provides" : {
      "Export::Attrs" : {

META.yml  view on Meta::CPAN

    - examples
    - inc
    - share
    - t
    - xt
provides:
  Export::Attrs:
    file: lib/Export/Attrs.pm
    version: v0.1.0
requires:
  PadWalker: '0'
resources:
  bugtracker: https://github.com/powerman/perl-Export-Attrs/issues
  homepage: https://github.com/powerman/perl-Export-Attrs
  repository: https://github.com/powerman/perl-Export-Attrs.git
version: v0.1.0
x_contributors:
  - 'Damian Conway <damian@conway.org>'
  - 'Niko Tyni <ntyni@debian.org>'

cpanfile  view on Meta::CPAN

requires 'PadWalker';

on test => sub {
    requires 'Test::More';
};

lib/Export/Attrs.pm  view on Meta::CPAN

package Export::Attrs;

our $VERSION = 'v0.1.0';

use warnings;
use strict;
use Carp;
use Attribute::Handlers;
use PadWalker qw( var_name peek_my );

my %IMPORT_for;

sub import {
    my $caller = caller;
    no strict 'refs';
    *{$caller.'::import'} = \&_generic_import;
    *{$caller.'::IMPORT'} = sub (&) { $IMPORT_for{$caller} = shift };
    for my $var_type (qw( SCALAR ARRAY HASH CODE )) {
        *{$caller.'::MODIFY_'.$var_type.'_ATTRIBUTES'} = \&_generic_handler;



( run in 1.084 second using v1.01-cache-2.11-cpan-05444aca049 )