#... at the start of your code ... # notice how exception definition and message format # string constant are in two different places and need # to be manually coordinated by the programmer. use Exception::Class { 'Exception::Copy::Mine' { fields => [qw(from to)]; } # ... lots of other exceptions here ... } my $MSG_COPY='Could not copy A.txt to B.txt"; ... later on when you throw the exception ... # notice the repetition in the use of exception # properties; the repetition is error prone and adds # unnecessary extra typing my $sMsg = sprintf($MSG_COPY, 'A.txt', 'B.txt'); Exception::Copy::Mine->throw(error => $sMsg , from => 'A.txt' , to => 'B.txt');