Lines Matching refs:element

71     #   struct( class => [ element-list ])
72 # struct( class => { element-list })
73 # struct( element-list )
177 croak "'$type' is not a valid struct element type";
281 $element_value = $obj->s; # element value
282 $obj->s('new value'); # assign to element
286 $ary_element_value = $obj->a(2); # array element value
287 $obj->a(2, 'new value'); # assign to array element
291 $hash_element_value = $obj->h('x'); # hash element value
292 $obj->h('x', 'new value'); # assign to hash element
302 Given a list of element names and types, and optionally
309 Each element in the struct data has an accessor method, which is
310 used to assign to the element and to fetch its value. The
314 Each element's type can be scalar, array, hash, or class.
339 Furthermore, if the class is hash-based, the key of each element is
349 Each name-type pair declares one element of the struct. Each
350 element name will be defined as an accessor method unless a
366 The four element types -- scalar, array, hash, and class -- are
370 The accessor method provided by C<struct> for an element depends
371 on the declared type of the element.
377 The element is a scalar, and by default is initialized to C<undef>
380 The accessor's argument, if any, is assigned to the element.
382 If the element type is C<'$'>, the value of the element (after
383 assignment) is returned. If the element type is C<'*$'>, a reference
384 to the element is returned.
388 The element is an array, initialized by default to C<()>.
391 element's whole array (whether or not the element was
395 specifying one element of the array; the second argument, if
396 present, is assigned to the array element. If the element type
397 is C<'@'>, the accessor returns the array element value. If the
398 element type is C<'*@'>, a reference to the array element is
402 as the sole argument, this causes an assignment of the whole array element.
407 The element is a hash, initialized by default to C<()>.
410 element's whole hash (whether or not the element was
414 one element of the hash; the second argument, if present, is
415 assigned to the hash element. If the element type is C<'%'>, the
416 accessor returns the hash element value. If the element type is
417 C<'*%'>, a reference to the hash element is returned.
420 as the sole argument, this causes an assignment of the whole hash element.
425 The element's value must be a reference blessed to the named
426 class or to one of its subclasses. The element is not initialized
429 The accessor's argument, if any, is assigned to the element. The
433 If the element type does not start with a C<'*'>, the accessor
434 returns the element value (after assignment). If the element type
435 starts with a C<'*'>, a reference to the element itself is returned.
445 Each initializer is a pair of values: I<element name>C< =E<gt> >I<value>.
446 The initializer value for a scalar element is just a scalar value. The
447 initializer for an array element is an array reference. The initializer
450 The initializer for a class element is an object of the corresponding class,
452 arguments to be passed to the element's constructor.
462 Giving a struct element a class type that is also a struct is how
493 element always to be nonnegative, so we redefine the C<count>
527 of I<element>=>I<value> pairs, with which to initialize the struct.
528 If no initializer is specified for a particular element, its default
599 returning a reference to an entire hash or array element.
601 to the element.
609 Treatment of '*' in element types corrected.
610 Treatment of classes as element types corrected.