Brackets, many kinds of them

This was kind of a headache for half an hour. Always remember to check all kind of brackets.

——————————————

DB<3> print $file_types_date_format->text
Can't call method "text" on unblessed reference at (eval 16)[/ade_autofs/gd30_dbem/nfsdo_generic/TFA/MAIN/GENERIC/150907.0402/perl/lib/5.14.4/perl5db.pl:640] line 2.

DB<5> print $file_types_date_format
ARRAY(0x138d348)
DB<6> print Dumper($file_types_date_format)
$VAR1 = [
bless( {
'Node::name' => 'date_format',
'Node::attributes' => [],
'Node::children' => [],
'Node::text' => '\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2}'
}, 'Node' )
];

DB<7> print $file_types_date_format::text

DB<8> print @{$file_types_date_format}[0]->text
\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s