Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: sub variables

by kevbot (Priest)
on Jul 23, 2017 at 05:37 UTC ( #1195808=note: print w/replies, xml ) Need Help??


in reply to Re: sub variables
in thread sub variables

I have a fairly large code-base that relies on Method::Signatures, and I have found that it works very well. However, it depends on Devel::Declare. The documentation for Devel::Declare states,
WARNING Warning: Devel::Declare is a giant bag of crack originally implemented + by mst with the goal of upsetting the perl core developers so much b +y its very existence that they implemented proper keyword handling in + the core. As of perl5 version 14, this goal has been achieved, and modules such +as Devel::CallParser, Function::Parameters, and Keyword::Simple provi +de mechanisms to mangle perl syntax that don't require hallucinogenic + drugs to interpret the error messages they produce.
So, for new code I would recommend Function::Parameters.

Also, it looks like the author of Method::Signatures (schwern) would like for the two modules to work well together. See these github issues,

However, these issues are a few years old and I don't know how much progress has been made in addressing them.

Replies are listed 'Best First'.
Re^3: sub variables
by Aaronrp (Beadle) on Jul 23, 2017 at 21:46 UTC
    Another module along this like is Toby Inkster's Kavorka, which seems very powerful.
Re^3: sub variables
by golux (Hermit) on Jul 23, 2017 at 14:10 UTC
    kevbot,

    Thank you for that info. I have noticed that there is one glitch that occurs in Method::Signatures on occasion. I like to use a func fatal($msg) subroutine in conjunction with caller, to handle fatal errors in some of my programs, and Method::Signatures causes it to sometimes misreport the line from which the error occurred, which schwern alludes to in your link about making it into a wrapper, so it's nice to finally have confirmation of this!

    In lieu of this I will try Function::Parameters with the hopes of using it as a replacement. I already like the idea of typing one less char for functions! (fun instead of func)

    say  substr+lc crypt(qw $i3 SI$),4,5

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1195808]
help
Chatterbox?
[Corion]: Hurr - as I'm running some not-so-static websites nowadays, maybe I really should implement a link checker that crawls these sites and checks that all internal links work ...
[Corion]: (in the sense of not returning 404 errors)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (16)
As of 2017-10-18 11:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (244 votes). Check out past polls.

    Notices?