# New Ticket Created by Benjamin Goldberg # Please include the string: [perl #131398] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=131398 >
There should be a trait, called either nyi or unimplemented (choose your favorite name and capitalization) which changes the subroutine or method it's applied to so that, when it's called, it dies or fails with an X::NYI exception. Alternatively, a slightly more generic solution might be more useful: role AutoDie[$class, $message?] { method CALL-ME(*@_, *%_)) { die $class.new: $message // |(); } }; role AutoFail[$class, $message?] { method CALL-ME(*@_, *%_) { fail $class.new: $message // |(); } } sub foo does AutoFail[X::NYI, "Sorry, we haven't gotten to foo yet!"] {...}