in reply to compiletime checking of valid method calls

I'm sorry not to comply with your plea, but...

What if the code adds new subroutines at runtime?

Why do you need it? It seems you picked a wrong language for the requirements.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: compiletime checking of valid method calls
by LanX (Saint) on Apr 08, 2019 at 16:10 UTC
    > What if the code adds new subroutines at runtime?

    My objective is to be better than the export constant solutions.

    And I'm only seeing this "solution" activated in the test/dev phase.*

    So if a method is added at runtime it would need to be "pre-registered" at compile time, much like a constant would need to be declared at compile time.³

    We don't add methods at compile time, and our "use" of OO is probably best described as weird QQ.²

    DISCLAIMER: I can't choose my colleagues and bosses and I don't have any alternative workplaces at disposal yet.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

    *) in other words it's not weirder than using PPI for this in a .t test.

    ²) My colleagues don't know how to add methods at compile time yet.

    ³) or checking would be deactivated by omitting the type information.