TUI-Vision

 view release on metacpan or  search on metacpan

lib/TUI/toolkit/UO/Antlers.pm  view on Meta::CPAN


sub import {
  my ( $class, @imports ) = @_;
  my $caller = caller(0);

  # Prevent double init per compilation unit
  return if $^H{ __PACKAGE__ . "/$caller" };
  $^H{ __PACKAGE__ . "/$caller" } = 1;

  # Turn on strict/warnings for caller
  strict->import;
  warnings->import;

  # When exporting 'extends', we assume that a class hierarchy exists and 
  # inject the base class if the class in the hierarchy has no parent
  my $exports = Importer->get( $class, @imports );
  if ( $exports->{extends} ) {
    require TUI::toolkit::UO::Base;
    no strict 'refs';
    unshift( @{"${caller}::ISA"}, 'TUI::toolkit::UO::Base' ) 
      unless ( @{"${caller}::ISA"} );



( run in 0.692 second using v1.01-cache-2.11-cpan-7fcb06a456a )