OK, will explain this more clearly. I want to add some custom variables
to an existing template, and am using the approach of adding a sub and
exporting it:
sub todays_list : Exported {
my ($self, $r ) = @_;
my $some_var = 'some value';
$r->objects( $self->search( some_var => $some_var->x) );
$r->template('list');
}
That is all fine, except I can't compile because I get and Invalid CODE error
when the compiler see ': Exported.' The suggested work arounds of wrapping
BEGIN {} around the sub or calling the sub last don't work.
Kim
Peter Speltz wrote:
On 1/10/06, Kim Ryan <[EMAIL PROTECTED]> wrote:
Hi,
I am trying to add my own templates using the sub my_template
:Exported {} type syntax
I do not know what this is " adding my own tepmlates" . Can you
elaborate on what you are trying to do?
--
pjs
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users