#!/usr/bin/perl use v5.14; # Extracts the names of the functions in the target file or from STDIN # and prints test stubs for them. sub print_test { my $name = shift; say <) { next unless /^func +(?:\(\w+ +\*?(\w+)\))? *(\w+)/; print_test $1.ucfirst($2); }