CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner: file generating an indent before the reCaptcha box


New User

Sep 17, 2011, 9:04 AM

Post #1 of 1 (695 views) file generating an indent before the reCaptcha box Can't Post

I have the following code in my file and it is resulting in an indent of the capctha box to the left. I have double checked by html files more than 10 time and there is no reason for the indent there. So I am assuming following code is responsible specially the <<EOP part.

I am not very good with perl can some one please help me get rid of this indent/space? It really looks unprofessional for a landing page the way it is. Thanks in advance for your help.

sub _html { shift->{_html} ||= HTML::Tiny->new } 

sub get_options_setter {
my $self = shift;
my $options = shift || return '';

croak "The argument to get_options_setter must be a hashref"
unless 'HASH' eq ref $options;

my $h = $self->_html;

return $h->script(
{ type => 'text/javascript' },
. "var RecaptchaOptions = "
. $h->json_encode( $options )
. ";\n//]]>\n"
) . "\n";

sub get_html
my ($self,$pubkey) = @_;
my $html = <<EOP
<script type="text/javascript">
var RecaptchaOptions = {theme: 'red'};
<script type="text/javascript" src="$pubkey"></script>

Sorry if this is a dumb question I am very new to perl. ThanksSmile


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives