use 5.014; use Test; use Data::Dumper qw(Dumper); use_ok('File'); my $f_from = File->new(); #my $f_to = File->new(); <--------- Note this line is commented out $f_from->section_add('BLAH'); print Dumper $f_from; #### ok 1 - use File; # # ### Dump from: 00-sections_copy_to_file.t line: 9 # $VAR1 = bless( # { # '_comment_chars' => bless( # { # 'begin_comment_char' => '#', # 'comment_char' => '#', # 'end_comment_char' => '#' # }, # 'File::CommentChars' # ), # '_content' => [ # bless( # { # '_prefix' => '# File::Section: BLAH', # '_suffix' => '# End File::Section: BLAH', # 'content' => [], # 'title' => 'BLAH' # }, # 'File::Section' # ) # ], # '_dir' => '', # '_line_count' => 0, # '_name' => '', # '_path' => '', # '_sections' => # bless( { 'BLAH' => $VAR1->{'_content'}[0] }, 'File::Sections' ), # '_type' => '' # }, # 'File' # ); # ### Dump from: 00-sections_copy_to_file.t line: 9 #### # ### Dump from: 00-sections_copy_to_file.t line: 9 # $VAR1 = bless( # { # '_comment_chars' => bless( # { # 'begin_comment_char' => '#', # 'comment_char' => '#', # 'end_comment_char' => '#' # }, # 'File::CommentChars' # ), # '_content' => [], # '_dir' => '', # '_line_count' => 0, # '_name' => '', # '_path' => '', # '_sections' => bless( # { # 'BLAH' => bless( # { # '_prefix' => '# File::Section: BLAH', # '_suffix' => '# End File::Section: BLAH', # 'content' => [], # 'title' => 'BLAH' # }, # 'File::Section' # ) # }, # 'File::Sections' # ), # '_type' => '' # }, # 'File' # ); # ### Dump from: 00-sections_copy_to_file.t line: 9