Unrecognized character

Hi!


I'm have a big problem. I make a module(pm) and now i
want compile this module. I tried use the perlcc but i
receive the msg that the module can't be compiled
because have shared libs.

However i found a module, PAR(Perl Archive Toolkit)
which can compile my module. Then, i was to install
this module(PAR). After the instalation of module i
run the command:

$ pp -o compiled.pm -M Exporter module.pm

ps.: The module.pm just require the lib Exporter.

I not have problems with the compilation. Then the
next step would be execute a script (CGI) that use the
compiled module.

I open my firefox and make run the script(CGI).
Unhappyly i get this msg: 
Unrecognized character \x7F at compiled.pm line 1.

Which i do? Have something wrong with the method of
compilation? Is someone that used the module PAR and
can help me? 


Thanks for all.
ps.: Sorry for my english



Augusto Flavio








	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail
0
moraisaf
2/4/2005 2:13:14 AM
perl.par 1171 articles. 0 followers. Follow

5 Replies
1796 Views

Similar Articles

[PageSpeed] 35

Augusto Flavio wrote:

>Hi!
>
>
>I'm have a big problem. I make a module(pm) and now i
>want compile this module. I tried use the perlcc but i
>receive the msg that the module can't be compiled
>because have shared libs.
>
>However i found a module, PAR(Perl Archive Toolkit)
>which can compile my module. Then, i was to install
>this module(PAR). After the instalation of module i
>run the command:
>
>$ pp -o compiled.pm -M Exporter module.pm
>
>ps.: The module.pm just require the lib Exporter.
>
>I not have problems with the compilation. Then the
>next step would be execute a script (CGI) that use the
>compiled module.
>
>I open my firefox and make run the script(CGI).
>Unhappyly i get this msg: 
>Unrecognized character \x7F at compiled.pm line 1.
>
>Which i do? Have something wrong with the method of
>compilation? Is someone that used the module PAR and
>can help me? 
>
>
>Thanks for all.
>ps.: Sorry for my english
>
>
>
>Augusto Flavio
>
>
>
>
>
>
>
>
>	
>		
>__________________________________ 
>Do you Yahoo!? 
>Yahoo! Mail - You care about security. So do we. 
>http://promotions.yahoo.com/new_mail
>
>  
>
Are you working in a Windows variant?  If so, Windows will not just 
execute something with a '.pm' extension.  Try just using

   pp -o compiled.exe main_perl_file.pl

Notice in your example below you have ".pm" twice:
    > pp -o compiled.pm -M Exporter module.pm
I use "compiled.exe" because that would be the name of the executable I would be trying to create.  I use perl_file.pl because that is the perl code I would want the compiled executable to be created from.

Also, I use Exporter quite often in my modules, and I NEVER have to use '-M Exporter'.  Try making your line just 
    
       pp -o compiled.exe main_perl_file.pl

Internal to each perl module that I use, where I want to export subroutines (NOT in the .pl file!) I have something like this:

     package my_package;
     use Exporter;
     @ISA = qw(Exporter);
     @EXPORT = ( "subroutine_1",
                 "subroutine_2",
                 ...
                 "subroutine_N",
               );

Good luck







0
the
2/4/2005 1:48:02 PM
Good morning,



Are you saying to me that i can't compile a module
(extension .pm)? I'm look a method to compile my
module(.pm). Can i do this with the pp? 

Have some way to obfuscate the code of a module?


Thanks for all



Augusto Flavio


	
	
		
_______________________________________________________ 
Yahoo! Acesso Gr�tis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet r�pida e gr�tis
0
moraisaf
2/4/2005 2:45:30 PM
Augusto Flavio wrote:

>Good morning,
>
>
>
>Are you saying to me that i can't compile a module
>(extension .pm)? I'm look a method to compile my
>module(.pm). Can i do this with the pp? 
>
>Have some way to obfuscate the code of a module?
>
>
>Thanks for all
>
>
>
>Augusto Flavio
>
>
>	
>	
>		
>_______________________________________________________ 
>Yahoo! Acesso Gr�tis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet r�pida e gr�tis
>
>  
>
I am not saying you cannot compile a module.  I suppose you can compile 
anything you want.  However, a perl module by itself presumably has no 
entry points, except as defined with Exporter (ie the subroutine entry 
points), as given to the invoking main perl file when it uses the "use 
module_name;" directive presumably near the top of the file. 

If you wrote the module correctly, invoking the module from the command 
line should give you ... nothing.  Well, almost nothing.  All such Perl 
modules must return a '1' value at the end or the syntax checker would 
complain.  Hence executing a compiled .pm file would simply return a '1'.
 
I have a feeling there is some miscommunication going on here.  To 
clarify things, here is a paste of the file my_module.pm and my_main.pl, 
and "pp -o aa.exe my_module.pm" which is a rather useless endeavor.
--------------------------paste of my_module.pm
package my_module;

use Exporter;
@ISA = qw(Exporter);
@EXPORT = ( "my_print" );

sub my_print {
  my ($message) = @_;
  print $message;
}
1;
------------------------end paste

------------------------paste of my_main.pl
use my_module;
my_print("Hello\n");
-----------------------end paste

 >pp -o aa.exe my_module.pm
 >aa.exe

 >
(Notice above that nothing happens when aa.exe is executed)
Now let me compile my_main.pl
 >pp -o aa.exe my_main.pl
 >aa.exe
Hello
 >
(Notice that "Hello" was printed out)

I hope this helps.








0
the
2/4/2005 3:57:37 PM
On 4 Feb 2005 at 11:45, Augusto Flavio wrote:

> Good morning,
> 
> 
> 
> Are you saying to me that i can't compile a module
> (extension .pm)? I'm look a method to compile my
> module(.pm). Can i do this with the pp? 
> 
> Have some way to obfuscate the code of a module?
> 
> 

The purpose of PAR is to create a standalone executable program, from a script and all 
of it's required modules. It does not compile individual files in the classic meaning 
of compiling binary code. It packages files together (creates a "compilation" of 
files).

Running:

	pp -o compiled.pm module.pm

will not create something that will allow you to:

	use compiled;

in another Perl script. The output of "pp -o" is a standalone executable program. You 
can use pp to compile your entire cgi script as a .exe, which will then include 
module.pm:

	pp -o my_cgi.exe my_cgi_script.pl

Also, if you really want obfuscation, you need to use a PAR obfuscation filter, like:

	pp -f Bleach

or:

	pp -f Bytecode

By default, PAR packages can be read with any zip file utility. Even so, obfuscation 
only slows down the determined hacker. It won't stop him.

Alan Stewart

0
astewart1
2/4/2005 6:12:31 PM
On 4 Feb 2005 at 11:45, Augusto Flavio wrote:

> Good morning,
> 
> 
> 
> Are you saying to me that i can't compile a module
> (extension .pm)? I'm look a method to compile my
> module(.pm). Can i do this with the pp? 
> 
> Have some way to obfuscate the code of a module?
> 

After re-reading my own documentation, I remembered what I should have said about using 
PAR to package just modules for use elsewhere.

Your module.pm will need to be installed in the Perl lib or site\lib directory. Create 
a small script "include.pl" that says:

	use module;

then run:

	pp -p -o module.par include.pl

then, in your cgi script:

	use PAR qw( module.par );

The resulting module.par file is really just a minor variation on a zip file. My 
comments on obfuscation still apply.

Alan Stewart

2
astewart1
2/4/2005 6:28:25 PM
Reply:

Similar Artilces:

Unrecognized character ... in column ...
Please be more specific in these error messages, as the user has no clue which column 4 you mean: $ perl -pwe 's/略x(.)/$1[略]/;' /dev/null Unrecognized character \xE7 in column 4 at -e line 1. $ perl -pwe ' s/略x(.)/$1[略]/;' /dev/null Unrecognized character \xE7 in column 4 at -e line 1. $ perl -pwe 's/略 x(.)/$1[略]/;' /dev/null Unrecognized character \xE7 in column 4 at -e line 1. $ perl -pwe 's/略x(.)/ $1[略]/;' /dev/null Unrecognized character \xE7 in column 13 at -e line 1. Ah, that column 4. (So the user should use \[.) ht...

Pasting from Word
When a user pastes text from a Word document that contains an apostrophe or double quote (and possibly other special characters), they are NOT the normal apostrophe or double quote. Example - normal apostrophe: ' Word pasted apostrophe: ‘ normal double quote: " Word pasted apostrophe: “ What can I do to convert these characters to something I can insert into my database, then read back out again? Right now, Oracle is converting them to upside down question marks and then they display as boxes in HTML.The aim of an argument or discussion should not be victory, but prog...

Par in a Par Problem
--------------enig270BAE432E2B9CEF90D3EBFD Content-Type: multipart/mixed; boundary="------------070803030909030002080707" This is a multi-part message in MIME format. --------------070803030909030002080707 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Try as I may, try as I might, I can't get this to work. I have four pars made using: > par.pl -p UNPACKED_CPAN_DIST_DIR I then put them into a directory called par, and zip that directory into catalyst.par (attached). Now, this does't seem to work for me: > perl -MPA...

Par inside par
Hiya As previously mentioned, I'm using PAR to build installer packages containing perl (and other gubbins) that complie to a single .exe and install on Windows. I have a couple of problems: 1) How do I make pp recognise more than one directory? E.g.: I want to have: Scripts/main.pl Data/test1.exe Data/test2.exe And be able to extract them from individual folders, however, whatever I do with PP, I only seem to be able to put things into the scripts/ directory.. 2) How do I do par within par I have a package (a) that depends on another package (b) being insta...

too many characters in character literal
I have this javascriptfunction kolla(hal) {  alert(document.getElementById('<%=txtHole'+hal+'Points.ClientID%>').value);     } the errormessage from VS2005 is too many characters in character literal   the functioncall is txtHole1Strokes.Attributes.Add("onchange", "kolla('1');");   how can i change the string?   also, this is ok document.getElementById('<%=txtHole8Strokes.ClientID%>').value;   // Regards Tomas  alert(document.getElementById('<%=txtHole %>'...

Remove characters after a specified character.
I have a datalist that has only one databound label control in it.  The field in the database is a DateTime data type.  All I want to do is trim or cut off everything after the date.  For example the data in the field is: 3/1/2007 12:00:00 A.M..  I want start at the space after 2007 and cut off everything to the right of it.  I currently have this in my text property: Eval("MDate" ).ToString().Remove(10).  That works ok, but if the date is only 8 or 9 characters long, you will see the start of the time part of the field.  Any help in the right direction wou...

remove characters after a certain character
 I'm trying to figure out to strip all characters after a certain character.  I am grabbing a file URL from a database that contains the filename, but also it's path.  I was hoping I could somehow strip out all the characters after a forward slash or backward slash.Some of the files look like this: c:\inetpub\wwwroot\vip2222\cases\MediaFiles\2da97d13-063b-4f69-2db42e8bbdb4\911ec365-c853-4650-9682-b464c3e17814.jpg  MediaFiles/4353495809-04955.jpghttp://www.myhomepage.com/images/image2500010001.gifAnd I just need the file name.  I tried using Replace, but that ...

reading character for character in a string
Hi, How can I read character for Character in a String or should I use split. example. strName = "Holland_Amsterdam" I need the word after the _  in another string variable. How can I do this. with kind regards, Alexander Since you know you have to split @ '-', use Split and get balues to array and use it!Sreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti...

How do I parse a string character by character?
Hi, I have a string i.e) 156.5 I need to be able to parse the string one character at a time and write the character value to an array Pseudo Code: For i=1 To String.Length strImageArray(i) = stringCharacter Next Hope this makes sense! Thanks, Chris TrystrImageArray = myString.ToCharArray...

Character Encoding and Character Size
I'm running Thunderbird 1.5.0.17 (20071210) For a long time, I've been puzzled that some plain-text messages from Yahoo mailing lists appear in my chosen typeface and point size, and some appear in such wee teeny type that I have to hit ctl+ several times to be able to read it. Sometimes someone will send an "oops" message immediately after another message, and one will be teeny and one will be normal. Intense study of the headers revealed no consistent differences between the two cases. Today, I accidentally discovered that if I open the View menu and change C...

parsing character by character and printing
I am completely new to Perl. I am trying to figure out how I can parse a row, character by character, that I have retrieved from a database. I would like to format output based on characters from the row. For example I may have retrieved 250 character string from a database and I want to print that character string, BUT I want to print only 50 characters a line or less. How might I do this if I have a variable called @row?? >I am trying to figure out how I can parse a row, character by >character, that I have retrieved from a database. You could try something lik...

Converting Characters to Other Characters from a DB
I have a SQL Server Database containing FAQ questions and answers... I had no problem getting a page built to pull the info and write it to a page... What I am having trouble figuring out is how to pull the info from the SQL DB and changing all of the newline ("\n") characters to HTML break tags ("<br />") so my output doesn't appear as one big paragraph... I have databind (or is it databound? Or databinded?) to a repeater and cannot for the life of me figure out how to work with the DataBinder.Eval(Container.DataItem,"ANSWER") to convert the ch...

Reading file character by character
This (hopefully) is going to be rediculously simple..... I'm trying to read a text file but I want to break it down character by character per line. essentially: sub Page_Load(sender as Object, e as EventArgs) &nbsp;&nbsp;&nbsp; 'Open a file for reading &nbsp;&nbsp;&nbsp; dim objreader as streamreader = new streamreader(server.mappath(".file.html") &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; objreader.open() &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; response.write(objreader.readline()) &nbsp;&am...

Unicode Characters to Character Value
For an engraving machine I need to store/retrieve machining details for characters ('A' through 'Z', 'a' to 'z', '0' to '9' and characters like '&'). All characters are available in CodePage 1200. I would like to name my files according to the code point number (eg. 0041 = 'A'). How do I transform for example the UnicodeString 'A' to codepoint number 0041? This transformation would enable me to save the 'A' in Helvetica in file 'Helv_0041.fnt'. Jaap Schokker wrote: > For an engraving machine I ...

Web resources about - Unrecognized character - perl.par

List of states with limited recognition - Wikipedia, the free encyclopedia
Some contemporary geopolitical entities that wish to be recognised as de jure sovereign states have been hindered by a lack of diplomatic recognition ...

Dark Eyes: "I feel nothing for their game, where beauty goes unrecognized..."
... purposes They tell me revenge is sweet and from where they stand, I'm sure it is But I feel nothing for their game, where beauty goes unrecognized ...

BLDGBLOG: Unrecognized for what they are
architectural conjecture :: urban speculation :: landscape futures

Clinton Goes Unrecognized At Chipotle
The Clinton campaign stopped for lunch at a Chipotle in suburban Ohio yesterday and the press is making a big deal because nobody there recognized ...

American Dream alive, but unrecognized
Only 25 percent of adults reported in the survey that they have been able to "make a lot of money" in their life.

Hillary Clinton goes unrecognized at Chipotle
... the restaurant's staff didn't recognize her. Breaking News CNN Sign in MyCNN 2016 Washington Nation World Our Team Hillary Clinton goes unrecognized ...

The Killing Of Muslim Lawyers: An Unrecognized Problem
In several different Muslim countries, a common problem.

Two Unrecognized Hall Of Fame Shortstops
This article is dedicated to the memory of the late Clem Comly, who did more than anyone to put together the Retrosheet.org public database of ...

That Time Jennifer Aniston Went Unrecognized...at Target! "It Was Pretty Awesome!"
You'd think Jennifer Aniston would have to go to the most remote place on Earth to find people wh...

This Was the Last Time 'N Sync and the Spice Girls Went Completely Unrecognized
This Was the Last Time 'N Sync and the Spice Girls Went Completely Unrecognized

Resources last updated: 12/30/2015 9:30:29 PM