esharris has asked for the wisdom of the Perl Monks concerning the following question:
When I run this script, I get "Unterminated attribute parameter in attribute list at ./test14.pl line 7, at end of line syntax error at ./test14.pl line 7, at EOF" I'm trying to understand what is an acceptable value for the :default parameters. After reading the write-up on CPAN and looking at the source, I concluded that the ":default" parameters can be a number, string, array ref, or hash ref literal. Unfortunately, the write-up doesn't provide a grammar and the source code was hard to follow.#!/usr/bin/perl -w use Class::Std; package Foo; my %a : ATTR( :default('<p />:(')); print "Hello\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Class::Std :default parameter
by xdg (Monsignor) on Oct 25, 2005 at 18:26 UTC | |
by esharris (Monk) on Oct 25, 2005 at 18:36 UTC | |
by xdg (Monsignor) on Oct 26, 2005 at 01:14 UTC | |
|
Re: Class::Std :default parameter
by Util (Priest) on Oct 26, 2005 at 01:27 UTC | |
|
Re: Class::Std :default parameter
by esharris (Monk) on Oct 25, 2005 at 18:09 UTC |