How do I make private functions in a Perl module?

前端 未结 9 964
后悔当初
后悔当初 2020-12-23 20:43

I am working on a little Perl module and for some reason I had the test driver script that was using my new module call one of the functions that I thought would be private,

9条回答
  •  无人及你
    2020-12-23 21:15

    In File for your package: Define private methods as CODE-Ref, i.e.:

    my $private_methode = sub{};
    

提交回复
热议问题