Lines Matching defs:meta
13 TAP::Parser::Source - a TAP source & meta data about it
34 do { ... } if $source->meta->{is_file};
42 provide some useful meta data about them. They are used by
66 $self->meta( {} );
83 =head3 C<meta>
85 my $meta = $source->meta;
86 $source->meta({ %some_value });
88 Chaining getter/setter for meta data about the source. This defaults to an
93 True if the source has meta data.
137 sub meta {
139 return $self->{meta} unless @_;
140 $self->{meta} = shift;
145 return scalar %{ shift->meta } ? 1 : 0;
178 my $meta = $source->assemble_meta;
180 Gathers meta data about the L</raw> source, stashes it in L</meta> and returns
232 return $self->meta if $self->has_meta;
234 my $meta = $self->meta;
239 $meta->{is_object} = UNIVERSAL::isa( $raw, 'UNIVERSAL' ) ? 1 : 0;
241 if ( $meta->{is_object} ) {
242 $meta->{class} = ref($raw);
246 $meta->{"is_$ref"} = 1;
249 if ( $meta->{is_scalar} ) {
251 $meta->{length} = length($$raw);
252 $meta->{has_newlines} = $$raw =~ /\n/ ? 1 : 0;
255 if ( !$meta->{has_newlines} and $meta->{length} < 1024 ) {
259 $meta->{file} = $file;
274 $meta->{is_file} = $file->{is_file} = -f _ ? 1 : 0;
275 $meta->{is_dir} = $file->{is_dir} = -d _ ? 1 : 0;
278 $meta->{is_symlink} = $file->{is_symlink}
300 elsif ( $meta->{is_array} ) {
301 $meta->{size} = $#$raw + 1;
303 elsif ( $meta->{is_hash} ) {
307 return $meta;