12 |
my ( $ModelName, $model, $create ) = @_; |
my ( $ModelName, $model, $create ) = @_; |
13 |
|
|
14 |
my $model_path = "lib/A3C/Model/$ModelName.pm"; |
my $model_path = "lib/A3C/Model/$ModelName.pm"; |
15 |
|
|
16 |
|
$model_path .= '.orig' if -e $model_path; |
17 |
|
|
18 |
write_file( $model_path, $model ); |
write_file( $model_path, $model ); |
19 |
print "Created $model_path\n"; |
print "Created $model_path\n"; |
20 |
|
|
84 |
} |
} |
85 |
|
|
86 |
my $test_path = "t/00-model-$ModelName.t"; |
my $test_path = "t/00-model-$ModelName.t"; |
87 |
|
$test_path .= '.orig' if -e $test_path; |
88 |
write_file( $test_path, $test ); |
write_file( $test_path, $test ); |
89 |
print "Created $test_path\n"; |
print "Created $test_path\n"; |
90 |
chmod 0755, $test_path; |
chmod 0755, $test_path; |