Re: why moose

2017-04-24 Thread Илья Рассадин
Quote from amazing ModernPerl book http://modernperlbooks.com/ "Perl's default object system is minimal but flexible. Its syntax is a little clunky, and it exposes /how/ an object system works. You can build great things on top of it, but it doesn't give you what many other languages do by def

Re: are state objects ok?

2017-04-24 Thread Chas. Owens
State variables are just like my variables but with a different lifetime, so it is safe (assuming it would be safe to use my variables that life for the lifetime of the program). In this case, what happens if you lose database access and then reconnect? What happens if you have two database handles

Re: why moose

2017-04-24 Thread Chas. Owens
The main benefits I see are 1. You have to write less code 2. Roles provide the benefits of multiple inheritance without the insanity 3. Introspection of Moose classes is easier 4. Type safety (which is really just points 1 and 3 again) The biggest one is 1. Moose is basically a declarative langu

why moose

2017-04-24 Thread Peng Yonghua
Hi, I saw many modules begin to write with Moose. For me I wrote my perl modules most time with OO style, I think perl's native OO works just fine. So why needs moose? thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org h

are state objects ok?

2017-04-24 Thread lee
Hi, is it ok to assign an object to a state variable? Or does doing so involve a chance of causing problems because objects are not supposed or designed to be used with the state-feature? Example: use feature qw(state); use DBI; sub foo { my ($dbh, $q, $finish) = @_; state $sth = $dbh->

Re: Perl reserved words

2017-04-24 Thread SSC_perl
> On Apr 23, 2017, at 11:51 AM, Shlomi Fish wrote: > > It is not a reserved word of Perl. No idea about MySQL. Must be something in the code then. I’ll try it again and see if it still happens. If so, I’ll make sure to mention the error instead of just saying “it doesn’t work”. ;) T