Changeset 16920
- Timestamp:
- 07/31/08 23:56:51 (5 years ago)
- Location:
- lang/perl/Business-ISRC/trunk
- Files:
-
- 1 added
- 9 modified
-
Makefile.PL (modified) (1 diff)
-
lib/Business/ISRC.pm (modified) (7 diffs)
-
t/00_load.t (modified) (1 diff)
-
t/10_basic.t (modified) (1 diff)
-
t/11_overload.t (modified) (1 diff)
-
t/12_invalid.t (modified) (1 diff)
-
t/20_normalize.t (modified) (1 diff)
-
t/50_random.t (modified) (1 diff)
-
t/98_critic.t (modified) (1 diff)
-
t/99_pod.t (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Business-ISRC/trunk/Makefile.PL
r16900 r16920 6 6 VERSION_FROM => 'lib/Business/ISRC.pm', 7 7 PREREQ_PM => { 8 'Locale::Country' => 2.07,9 'Class::Accessor ' => 0.31,8 'Locale::Country' => 2.07, 9 'Class::Accessor::Fast' => 0.31, 10 10 }, 11 11 ($] >= 5.005 ? 12 12 (ABSTRACT_FROM => 'lib/Business/ISRC.pm', 13 AUTHOR => 'nakano kyohei (bonar) bonar@me.com>') : ()),13 AUTHOR => 'nakano kyohei (bonar) <bonamonchy@gmail.com>') : ()), 14 14 ); -
lang/perl/Business-ISRC/trunk/lib/Business/ISRC.pm
r16900 r16920 5 5 6 6 use Locale::Country qw/code2country/; 7 use base 'Class::Accessor ';7 use base 'Class::Accessor::Fast'; 8 8 9 9 use overload '""' => 'as_default_string'; … … 103 103 104 104 # create object (validate string) 105 my $isrc = Business::ISRC->new("usl4q0702458"); 106 if (!defined $isrc) { 107 die "invalid isrc format"; 108 } 105 my $isrc = Business::ISRC->new("usl4q0702458") 106 or die "invalid isrc format"; 109 107 110 108 $isrc->country_code; # US … … 122 120 =head1 DESCRIPTION 123 121 124 This module provides data container for ISRC. ISRC is theunique code122 This module provides data container for ISRC. ISRC is an unique code 125 123 for identifying sound recordings and music videos internationally. 126 124 You can use this to validate or normalize ISRC strings. … … 133 131 =head2 ISRC FORMAT 134 132 135 ISRC consists offive parts:133 ISRC string is made up for these five parts: 136 134 137 135 sample: US-L4Q-07-02458 … … 145 143 =head1 ACCESSOR 146 144 147 all fields are read-only. 145 all accessors are created by mk_ro_accessors of Class::Accessor::Fast. 146 so all fields are read-only. 148 147 149 raw_string 150 country_code 151 country_name 152 registrant_code 153 year 154 designation_code 148 raw_string # first argument of new() 149 country_code 150 country_name 151 registrant_code 152 year 153 designation_code 154 155 you can get value like this: 156 157 my $rc = $isrc->registrant_code; 155 158 156 159 =head1 METHOD … … 171 174 ); 172 175 176 =head2 as_default_string() 177 178 same as as_string() with no option. 179 173 180 =head1 SEE ALSO 174 181 … … 177 184 =head1 AUTHOR 178 185 179 Nakano Kyohei (bonar) E<lt>bona r@me.comE<gt>186 Nakano Kyohei (bonar) E<lt>bonamonchy@gmail.comE<gt> 180 187 181 188 =head1 COPYRIGHT AND LICENSE -
lang/perl/Business-ISRC/trunk/t/00_load.t
r16900 r16920 1 #! /usr/bin/perl1 #!perl -T 2 2 3 3 use strict; -
lang/perl/Business-ISRC/trunk/t/10_basic.t
r16900 r16920 1 #! /usr/bin/perl1 #!perl -T 2 2 3 3 use strict; -
lang/perl/Business-ISRC/trunk/t/11_overload.t
r16900 r16920 1 #! /usr/bin/perl1 #!perl -T 2 2 3 3 use strict; -
lang/perl/Business-ISRC/trunk/t/12_invalid.t
r16900 r16920 1 #! /usr/bin/perl1 #!perl -T 2 2 3 3 use strict; -
lang/perl/Business-ISRC/trunk/t/20_normalize.t
r16900 r16920 1 #! /usr/bin/perl1 #!perl -T 2 2 3 3 use strict; -
lang/perl/Business-ISRC/trunk/t/50_random.t
r16900 r16920 1 #! /usr/bin/perl1 #!perl -T 2 2 3 3 use strict; -
lang/perl/Business-ISRC/trunk/t/98_critic.t
r16900 r16920 1 #! /usr/bin/perl1 #!perl -T 2 2 3 3 use strict;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)