|Subject:||Use of K::D::Arg for optional arguments breaks API and is not documented as such|
Damian, thanks for this module, which I have been using in my own dists for a year or two. I also greatly enjoyed your Inception conference-talk video. :) In v0.001015, my Test::OnlySome breaks:(thanks to ANDK for the report). The keyword declaration is: keyword os(String? $debug_var, Var? $opts_name, Num? $N, Block|Statement $controlled) (e.g., to be used as `os ok(1, "this test passed (if it was run)")`). In <= v0.001014, optional $debug_var, $opts_name, and $N are undef if the corresponding syntactic element is not present where the keyword is used. However, in v0.001015, all three are K::D::Arg instances, thus defined, regardless of whether the element is present. This contradicts the examples in the K::D POD, which still use `defined` to check whether an optional parameter is present. (E.g., ). - If you still intend `defined` to be usable to check whether an optional parameter is present, would you please not pass a K::D::Arg instance? - If K::D::Arg is the desired API change even for this situation, would you please update the documentation to show how to check for presence of the argument? If you wish, please feel free to use my current hack: . (However, there's almost certainly a better way!) Thank you for considering this request!