Hi,

I am quite new to Mojolicious and even web development.  I am in the midst
of writing a mojo_lite app.  The code is simple, very basic.  And yet I have
the above error and I am just wondering how to get past the error.  

In the controller file (name = ewo), here is my stash, render, and redirect
code:

$self->stash(
        username        =>      $username,
        ewos_hashPtr    =>      $self->make_ewo_hash($username),
        );
                                
        $self->render( 'ewo' );
        $self->redirect_to( 'ewo' );


Now, the app does succeed in getting to 127.0.0.1:3000/ewo and it does
"know" of the stashed variables.  This is confirmed by the following code
within ewo.html.ep:

% open (TEST,">$dir/ewo_template.txt"); 

% print TEST '@_: ', Dumper(@_);

% print TEST '$ldap_username: ', Dumper($username);
% print TEST '%{$ewos_hashPtr}: ', Dumper(%{$ewos_hashPtr});


And here are the contents of the file it is written to (ewo_template.txt):
$username: $VAR1 = '[email protected]';
%{$ewos_hashPtr}: $VAR1 = '476-37-4583565';
$VAR2 = 'I want to stay in Winterfell';
$VAR3 = '476-37-7934120';
$VAR4 = 'I do not want to be the hand of the King';
$VAR5 = '476-37-7173907';
$VAR6 = 'Winter is coming!';
$VAR7 = '476-37-3445774';
$VAR8 = 'Jon Snow is my bastard son';
$VAR9 = '476-37-4731198';
$VAR10 = 'I do not care for Jaime Lannister';


The above are 100% correct.

However, the app fails at the ewo page with the following errors:
Global symbol "$username" requires explicit package name at template
/ewo.html.ep line 14, <DATA> line 577.
Global symbol "$ewos_hashPtr" requires explicit package name at template
/ewo.html.ep line 15, <DATA> line 577.


I have no idea what package name it may be talking about and am unaware of
specifying one.  I have tried a few things with no luck so far.


Tony

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to