--- trunk/lib/Frey/ClassCreator.pm 2008/12/02 17:34:23 681 +++ trunk/lib/Frey/ClassCreator.pm 2008/12/02 17:36:51 682 @@ -24,13 +24,6 @@ default => 0, ); -sub path_size { - my $path = shift; - $path .= ' ' . ( -s $path ) . ' bytes'; - warn "# path_size: $path"; - return $path; -} - sub create_class_source_as_markup { my ($self) = @_; @@ -44,8 +37,8 @@ $test_path =~ s{::}{-}; $test_path = "t/30-$test_path.t"; - die qq|class "$class" exists |, path_size($class_path) if -e $class_path; - die qq|test for "$class" exists |, path_size($class_path) if -e $class_path; + die qq|class "$class" exists as |, $self->path_size($class_path) if -e $class_path; + die qq|class "$class" test exists as |, $self->path_size($test_path) if -e $test_path; warn "## path $class_path"; $self->mkbasepath( $class_path ); @@ -55,18 +48,21 @@ my $code = read_file( 'lib/Frey/Skeleton.pm' ); $code =~ s{$skeleton}{$class}g; write_file( $class_path, $code ); - warn "# created class $class at ", path_size($class_path); + warn "# created class $class at ", $self->path_size($class_path); system "svk add $class_path" if $self->svk_add; $code = read_file( 't/30-frey-skeleton.t' ); $code =~ s{$skeleton}{$class}g; write_file( $test_path, $code ); chmod 0755, $test_path; - warn "# created class $class at ", path_size($test_path); + warn "# created class $class at ", $self->path_size($test_path); system "svk add $test_path" if $self->svk_add; my $html - = qq|Created "$class" and $test_path| + = qq|Created class "$class" at | + . $self->path_size($class_path) + . qq| and test | + . $self->path_size($test_path) ; $html = $self->editor_links( $html );