~ubuntu-branches/ubuntu/vivid/libclass-accessor-grouped-perl/vivid

« back to all changes in this revision

Viewing changes to t/lib/AccessorGroupsWO.pm

  • Committer: Package Import Robot
  • Author(s): Xavier Guimard
  • Date: 2013-03-19 06:29:32 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: package-import@ubuntu.com-20130319062932-xngayhbrbvykfcvh
Tags: upstream-0.10009
ImportĀ upstreamĀ versionĀ 0.10009

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
__PACKAGE__->mk_group_wo_accessors('simple', 'singlefield');
7
7
__PACKAGE__->mk_group_wo_accessors('multiple', qw/multiple1 multiple2/);
8
8
__PACKAGE__->mk_group_wo_accessors('listref', [qw/lr1name lr1;field/], [qw/lr2name lr2'field/]);
 
9
__PACKAGE__->mk_group_wo_accessors('simple', [ fieldname_torture => join ('', map { chr($_) } (0..255) ) ]);
9
10
 
10
11
sub new {
11
 
    return bless {}, shift;
 
12
  return bless {}, shift;
12
13
};
13
14
 
14
15
foreach (qw/multiple listref/) {
15
 
    no strict 'refs';
16
 
    *{"set_$_"} = __PACKAGE__->can('set_simple');
 
16
  no strict 'refs';
 
17
  *{"set_$_"} = __PACKAGE__->can('set_simple');
17
18
};
18
19
 
19
20
1;