develooper Front page | perl.perl5.porters | Postings from August 2013

Re: [perl #119189] Bleadperl v5.19.2-276-g38be3d0 breaksLEONT/Const-Fast-0.014.tar.gz

Thread Previous | Thread Next
Nicholas Clark
August 22, 2013 11:14
Re: [perl #119189] Bleadperl v5.19.2-276-g38be3d0 breaksLEONT/Const-Fast-0.014.tar.gz
Message ID:
On Thu, Aug 22, 2013 at 12:57:22PM +0200, Leon Timmermans wrote:
> On Wed, Aug 21, 2013 at 5:21 PM, Father Chrysostomos via RT <
>> wrote:
> > Suggestions?
> >
> Scalar::Util comes to mind, even if it can be used on non-scalars.

Possibly there ought to be a restriction to using it only on scalars.

Setting the "read only" flag can mean different things on the other types.
It's (currently) used to mark restricted hashes, which aren't exactly

av.c suggests that arrays honour it, at least partially. Note, I don't
trust arrays flagged READONLY to actually be immutable (given the
contortions of the source) but I haven't actually found an exception. Yet.

Also, Scalar::Util already has a readonly() function to read it, but I'm
not sure what "it" is. In that, part of the frustration is that the flag
bit SVf_READONLY means a whole bunch of things, which might not always have
the semantics of "read only" that the programmer thought. It's not well
defined. Or at least, not well specified.

> >  You can use B for that.
> >
> I don't think that's really better than using Internals::


Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About