Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: Recap: The Future of Perl 5

by tobyink (Canon)
on Aug 24, 2018 at 17:02 UTC ( [id://1221043]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Recap: The Future of Perl 5
in thread Recap: The Future of Perl 5

Type::Tie does similar to your example tie code. And there's XS implementations for a lot of types in Type::Tiny::XS. I really should look at the possibility of implementing the tie stuff in XS too.

use Type::Tie; use Types::Common::Numeric qw(PositiveOrZeroInt); tie my $x, PositiveOrZeroInt;

Combining it with Attribute::Handlers could be a fun idea.

Also, you probably want to use [0-9] in your regular expression, not \d. Yes, there's a difference.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1221043]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found