#! perl -slw use strict; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'END_C', NAME => 'secret', CLEAN_AFTER_BUILD => 0; static char code[] = "\ use DBI;\ use DBD::Pg;\ DBI->connect(\"dbi:Pg:database=test;\", 'EXXC', 'DRTERC' )\ "; static char *user = code + 59; static char *pass = code + 67; SV *getDBH ( SV *dummy ) { int i; for( i = 0; i < 4; ++i ) user[ i ] ^= 55; for( i = 0; i < 6; ++i ) pass[ i ] ^= 55; // The next line is (obviously) for demonstration purposes only!!! printf( "'%s'", code ); return eval_pv( code, 1 ); } END_C print getDBH( 'fred' ); __END__ C:\test>secret 'use DBI;use DBD::Pg;DBI->connect("dbi:Pg:database=test;", 'root', 'secret' )' DBI connect('database=test;','root',...) failed: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "???" and accepting TCP/IP connections on port 5432? at (eval 10) line 1 Use of uninitialized value in print at C:\test\secret.pl line 29. Attempt to free unreferenced scalar: SV 0x411b660, Perl interpreter: 0x29fb8.