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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Error with WWW::Scripter module in packaged script

 



bubblesnout
New User

Sep 6, 2018, 12:27 AM

Post #1 of 3 (1278 views)
Error with WWW::Scripter module in packaged script Can't Post

I have packaged a script with pp on Windows (Strawberry Perl) which uses the WWW::Scripter module. It packages just fine, but when running the resultant .exe I receive the following message:


Code
Can't find string terminator "r" anywhere before EOF at CSS/DOM/Interface.pm line 85. 
Compilation failed in require at WWW/Scripter.pm line 9.
BEGIN failed--compilation aborted at WWW/Scripter.pm line 9.


I've had a look at the CSS/DOM/Interface.pm file and line 85 reads: 0 and q r

Snippet of the file:


Code
=head1 DESCRIPTION 

The synopsis should tell you almost everything you need to know. But be
warned that C<$foo & TYPE> is meaningless when C<$foo & METHOD> and
C<$foo & VOID> are both true. For more
gory details, look at the source code. In fact, here it is:

=cut

0 and q r

=for ;

our @EXPORT_OK = qw/METHOD VOID READONLY BOOL STR NUM OBJ TYPE/;
our %EXPORT_TAGS = (all => \@EXPORT_OK);

sub METHOD () { 1 }
sub VOID () { 0b10 } # for methods
sub READONLY () { 0b10 } # for properties


If I run my .pl script with Perl directly it runs just fine, no idea what's going on here!


BillKSmith
Veteran

Sep 6, 2018, 7:42 AM

Post #2 of 3 (1271 views)
Re: [bubblesnout] Error with WWW::Scripter module in packaged script [In reply to] Can't Post

I do not understand lines 84 thru 86. It seems that the POD interpreter considers them as a POD directive. The perl interpreter considers them as Perl. The pp compiler gets confused. There probably is a bug in at least one of those programs. I recommend that you contact the author of the module for help with this.

In the mean time, you could try to add single space before the equal sign on line 86. This would make sure that it is not treated as POD. Even if it 'works', restore the original code when you are done.
Good Luck,
Bill


Zhris
Enthusiast

Sep 11, 2018, 7:36 AM

Post #3 of 3 (1234 views)
Re: [bubblesnout] Error with WWW::Scripter module in packaged script [In reply to] Can't Post

I am with Bill. It looks like a typo that the author of CSS::DOM::Interface made, but was never spotted since it compiles just fine. It thinks the q is the beginning of a quote like operation, where r is the delimiter.


Code
0 and q r 
=for ;

# is effectively

0 and '=fo';


The code is useless and can be commented out. However not at all sure why it doesn't compile after being packaged. Do you have any Par::Filter's on. The snippet of the file you provided, is that your library version, or the version packaged in your executable?

Chris

 
 


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

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