in reply to Perl's caller builtin
How bent are you on testing that the resulting test matches exactly? Wouldn't it be enough to match that the resulting error message contains
02-internals_magic.t at line ...
I would use a regular expression to confirm that the string ends with what you want, instead of trying to cater for every native file system name. Also, maybe you want to avoid File::Spec if you want Unix-semantics filenames. For unixish semantics (as Perl uses in its error messages), you can always concatenate with slashes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl's caller builtin
by geoffleach (Scribe) on Jul 30, 2011 at 22:59 UTC |