1#!/usr/bin/env perl 2use warnings; 3use strict; 4use Test::More tests => 8; 5 6package Test01; 7use parent 'Class::Accessor::Complex'; 8__PACKAGE__->mk_new->mk_concat_accessors('plain', [ output => '---' ]); 9 10package main; 11can_ok( 12 'Test01', qw( 13 output output_clear clear_output 14 ) 15); 16my $test01 = Test01->new; 17is($test01->output, undef, 'concat default value'); 18$test01->output('blah'); 19is($test01->output, 'blah', 'added "blah"'); 20$test01->output(7); 21is($test01->output, 'blah---7', 'added 7'); 22$test01->clear_output; 23is($test01->output, undef, 'after clear'); 24$test01->plain('blah'); 25is($test01->plain, 'blah', 'empty join string: added "blah"'); 26$test01->plain(7); 27is($test01->plain, 'blah7', 'empty join string: added 7'); 28$test01->clear_plain; 29is($test01->plain, undef, 'empty join string: after clear'); 30