Changeset 130

Show
Ignore:
Timestamp:
06/27/01 13:22:04
Author:
miyagawa
Message:

add All CAPS

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • abbreviation/trunk/MANIFEST

    r125 r130  
    22MANIFEST 
    33Makefile.PL 
     4README 
    45lib/abbreviation.pm 
    56t/test.t 
     
    78testlib/FooBar/Baz.pm 
    89testlib/FooBar/Baz/Doh.pm 
     10testlib/UML/Master.pm 
  • abbreviation/trunk/lib/abbreviation.pm

    r129 r130  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = '0.01'; 
     5$VERSION = '0.02'; 
    66 
    77sub import { 
     
    2828 
    2929    # Mission: 
    30     # Foo::Bar::Baz => F::B::Baz 
    31     # Foo::bar::Baz => F::b::Baz 
    32     # FooBar::Bar::Baz => FB::B::Baz 
    33     return join '::', (map { tr/A-Z0-9//cd; $_; } @pkg), $lastone; 
     30    # Foo::Bar::Baz -> F::B::Baz 
     31    # Foo::bar::Baz -> F::b::Baz 
     32    # FooBar::Bar::Baz -> FB::B::Baz 
     33    # FOO::Bar -> F::Bar 
     34    return join '::', (map { 
     35        s/^([A-Z])[A-Z0-9]+$/$1/; # FOO -> F 
     36        tr/A-Z0-9//cd; 
     37        $_; 
     38    } @pkg), $lastone; 
    3439} 
    3540 
  • abbreviation/trunk/t/test.t

    r125 r130  
    11use strict; 
    22use Test; 
    3 BEGIN { plan tests => 5
     3BEGIN { plan tests => 7
    44 
    55use lib qw(testlib); 
    6 use abbreviation qw(Foo FooBar::Baz FooBar::Baz::Doh); 
     6use abbreviation qw(Foo FooBar::Baz FooBar::Baz::Doh UML::Master); 
    77 
    88ok(Foo->new); 
     
    1111ok(FooBar::Baz::Doh->new); 
    1212ok(FB::B::Doh->new); 
     13ok(UML::Master->new); 
     14ok(U::Master->new); 
    1315 
    1416