Changeset 2be605a for perl/lib/BarnOwl


Ignore:
Timestamp:
Jul 18, 2009, 11:13:30 AM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
203dcda
Parents:
96f7b07
Message:
Add BarnOwl commands to @EXPORT_OK.
Location:
perl/lib/BarnOwl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Editwin.pm

    rc6ecf5c r2be605a  
    2020                    point_move replace_region get_region
    2121                    save_excursion current_column point mark);
     22our %EXPORT_TAGS = (all => \@EXPORT_OK);
    2223
    2324sub text_before_point {
  • perl/lib/BarnOwl/Hooks.pm

    reb6cedc r2be605a  
    55
    66use Carp;
     7use List::Util qw(first);
    78
    89=head1 BarnOwl::Hooks
     
    206207            BarnOwl::command($command . " " . join(" ", @_))
    207208          };
    208     }
     209        if(defined(*{"${package}::EXPORT_OK"}{ARRAY})
     210          && !contains(*{"${package}::EXPORT_OK"}{ARRAY}, $symbol)) {
     211            push @{*{"${package}::EXPORT_OK"}{ARRAY}}, $symbol;
     212        }
     213    }
     214}
     215
     216sub contains {
     217    my $list = shift;
     218    my $what = shift;
     219    return defined(first {$_ eq $what} @$list);
    209220}
    210221
Note: See TracChangeset for help on using the changeset viewer.