From 2818b492e282c29331d9186dd83d3241ad8662b4 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 1 Nov 2006 05:07:33 +0000 Subject: Adding simple, stupid cli script sample to illustrate file syntax git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@447 4979c152-3d1c-0410-bac9-87ea11338e46 --- utils/cli/ledgersmb_cli.pl | 2 +- utils/cli/sample.lsmb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 utils/cli/sample.lsmb (limited to 'utils') diff --git a/utils/cli/ledgersmb_cli.pl b/utils/cli/ledgersmb_cli.pl index 1dbbf2fa..faf77abd 100644 --- a/utils/cli/ledgersmb_cli.pl +++ b/utils/cli/ledgersmb_cli.pl @@ -22,7 +22,7 @@ while ($line = <>){ } elsif ($line =~ /^\s*(.+)\s*=\s*(.+)/){ $form->{$1} = $2; } elsif ($line =~ /^\s*CALL (.+)/){ - &{$1}(\%$form); + {$1}(\%$form); } elsif ($line !~ /^\s*$/) { die "Parse error in script file: $line"; } diff --git a/utils/cli/sample.lsmb b/utils/cli/sample.lsmb new file mode 100644 index 00000000..05650f97 --- /dev/null +++ b/utils/cli/sample.lsmb @@ -0,0 +1,6 @@ +# THe below line shows how to set the PGUSER environment variable +ENV:PGUSER = postgres +user = demo # set username +password = demo # set password +MODULE AR # load AR +CALL AR::transactions -- cgit v1.2.3