Zoom-Meeting

 view release on metacpan or  search on metacpan

local/lib/perl5/Moo.pm  view on Meta::CPAN


sub import {
  my $target = caller;
  my $class = shift;
  if ($INC{'Role/Tiny.pm'} and Role::Tiny->is_role($target)) {
    croak "Cannot import Moo into a role";
  }

  _set_loaded(caller);

  strict->import;
  warnings->import;

  $class->_install_subs($target, @_);
  $class->make_class($target);
  return;
}

sub make_class {
  my ($me, $target) = @_;

local/lib/perl5/MooseX/Types.pm  view on Meta::CPAN

#pod will continue to L<Moose::Util::TypeConstraints>' C<import> method to export
#pod helper functions you will need to declare your types.
#pod
#pod =cut

sub import {
    my ($class, %args) = @_;
    my  $caller = caller;

    # everyone should want this
    strict->import;
    warnings->import;

    # inject base class into new library
    {   no strict 'refs';
        unshift @{ $caller . '::ISA' }, 'MooseX::Types::Base';
    }

    # generate predeclared type helpers
    if (my @orig_declare = @{ $args{ -declare } || [] }) {
        my ($tags, $declare) = filter_tags @orig_declare;

local/lib/perl5/Role/Tiny.pm  view on Meta::CPAN

    }
    grep exists &{"${package}::${_}"},
    grep !/::\z/,
    keys %$stash
  };
}

sub import {
  my $target = caller;
  my $me = shift;
  strict->import;
  warnings->import;
  my $non_methods = $me->_non_methods($target);
  $me->_install_subs($target, @_);
  $me->make_role($target);
  $me->_mark_new_non_methods($target, $non_methods)
    if $non_methods && %$non_methods;
  return;
}

sub _mark_new_non_methods {

local/lib/perl5/x86_64-linux-thread/Moose/Exporter.pm  view on Meta::CPAN

        my $class = $exporting_package;

        $CALLER = _get_caller(@_);

        # this works because both pragmas set $^H (see perldoc
        # perlvar) which affects the current compilation -
        # i.e. the file who use'd us - which is why we don't need
        # to do anything special to make it affect that file
        # rather than this one (which is already compiled)

        strict->import;
        warnings->import;

        my $did_init_meta;
        for my $c ( grep { $_->can('init_meta') } $class, @{$exports_from} ) {

            # init_meta can apply a role, which when loaded uses
            # Moose::Exporter, which in turn sets $CALLER, so we need
            # to protect against that.
            local $CALLER = $CALLER;
            $c->init_meta(

local/lib/perl5/x86_64-linux-thread/Moose/Exporter.pm  view on Meta::CPAN

    return unless %new_style_roles || %old_style_roles || %base_class_roles;

    return sub {
        shift;
        my %opts = @_;
        $meta_lookup->($opts{for_class});
    };
}

sub import {
    strict->import;
    warnings->import;
}

1;

# ABSTRACT: make an import() and unimport() just like Moose.pm

__END__

=pod



( run in 0.376 second using v1.01-cache-2.11-cpan-299005ec8e3 )