Comments (7)
Conditionally loaded, I concur. No competing validation system has a much coverage as the Moose world
from method-signatures.
Yes. Like everything in MS, you only pay for what you use. And Any::Moose will default to Mouse if something else hasn't already loaded Moose.
from method-signatures.
Just a couple of quick notes on using Any::Moose thus far:
*) Mouse doesn't seem to implement ScalarRef[Type] for some reason. Not that it's bothering me that much--I'll just move the test somewhere where I can guarantee that Moose is loaded first--but it's an oddity that I suppose we'll have to mention in the documentation (I'm also planning on updating the doco, BTW, in case anyone was worried about that). And hopefully that's the only real impact.
*) So right now I have a test that verifies that, unless Moose is loaded before MS is use'd, Mouse will get loaded, and it won't get loaded until the type checking is actually called. But it occurs to me that I have no way to make this conditional on Any::Moose/Mouse being installed; if I do a skip block conditional on a use_ok, then Mouse gets loaded and my test to verify it's not loaded before the method is called fails. So I think I have to give up that test, unless someone else has a brilliant idea that I've just failed to see. :)
from method-signatures.
To the first point, I think it's enough to say that Moose and Mouse may have slight differences which will become less and less as time goes on rather than document the current snapshot of their differences. Similarly, don't redocument the Moose type system. Just refer the user to the appropriate Moose docs.
To the second, Any::Moose will be a dependency of Method::Signatures. So you'll always have Mouse installed.
from method-signatures.
To the first point, I think it's enough to say that Moose and Mouse may have slight differences ...
Good point. Saves us having to change the documentation every time something changes on the Mouse/Moose side.
Any::Moose will be a dependency of Method::Signatures. So you'll always have Mouse installed.
Really? Since type checking will be optional, I figured you didn't want to intriduce a dependency that some people might not need. But it's no skin off my nose either way. :)
from method-signatures.
Mouse is well maintained and has no dependencies. It's a far lighter dependency than what we already depend on.
And we can use it internally.
from method-signatures.
If it works for you, it works for me. :) I'll just make the Moose checking part conditional then.
from method-signatures.
Related Issues (20)
- Allow bare sigils as placeholders HOT 1
- Benchmarks vs 5.20
- Type checks should be done after default is applied. HOT 3
- Line numbers offset when signature has spaces in it HOT 9
- Type checking of defaults
- Multi-line defaults are broken HOT 1
- ($a, $b?, $c) should be a compile error HOT 1
- Type error in earlier Perl versions on Windows
- Anonymous functions which are a key in a hash will get the line number of the hash declaration. HOT 2
- Become a wrapper around Function::Parameters HOT 10
- Change Any::Moose for Moo HOT 4
- Getting "The type is unrecognized" if spaces are added HOT 1
- libmethod-signatures-perl: depends on libdata-alias-perl, broken with Perl 5.24
- support Type::Tiny HOT 33
- Support 'method BUILD' for Moo.* HOT 7
- Data::Alias is still required in 20131010 HOT 3
- t/thread-bug.t crashes on Mac OS X with threading enabled HOT 4
- Deprecate `@_` in favor of `...` HOT 1
- Move to evalEmpire org HOT 4
- Allow attributes between sub name and signature HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from method-signatures.