Skip to content

Instantly share code, notes, and snippets.

@hesco
Last active January 1, 2018 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hesco/968beb44f4ac15afdd8324a7c8c13966 to your computer and use it in GitHub Desktop.
Save hesco/968beb44f4ac15afdd8324a7c8c13966 to your computer and use it in GitHub Desktop.
I need this to handle the case where neither $pid, nor $page are defined. In the legacy cgi application I am refactoring, everything is passed around as '?page=admin&pid=99' on the urls.
[Sun Dec 31 23:58:27 2017] [error] Global symbol "$pid" requires explicit package name at template user/login/login_dispatch.html.ep line 4.
Global symbol "$pid" requires explicit package name at template user/login/login_dispatch.html.ep line 5.
Global symbol "$page" requires explicit package name at template user/login/login_dispatch.html.ep line 7.
Global symbol "$page" requires explicit package name at template user/login/login_dispatch.html.ep line 8.
1: <div class="cf_vote-login-form">
2: %= form_for "login" => begin
3: %= hidden_field format => 'html', id => 'format'
4: <% if ( defined( $pid ) ){ %>
5: %= hidden_field pid => $pid
6: <% } %>
7: <% if ( defined( $page ) ){ %>
8: %= hidden_field page => $page
9: <% } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment