ARSObject

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

MANIFEST
Makefile.PL
readme
test.pl
lib/ARSObject.pod
lib/ARSObject.pm
META.yml                                 Module meta-data (added by MakeMaker)

lib/ARSObject.pm  view on Meta::CPAN

	$_[0]->{-cgi}->escapeHTML(@_[1..$#_])
}


sub cgitfrm {	# table form layot
		# -form =>{form attrs}, -table=>{table attrs}, -tr=>{tr attrs}, -td=>{}, -th=>{}
 my ($s, %a) =$_[0];
 my $i =1;
 while (ref($_[$i]) ne 'ARRAY') {$a{$_[$i]} =$_[$i+1]; $i +=2};
 $s->cgi->start_form(-method=>'POST',-action=>'', $a{-form} ? %{$a{-form}} : ())
	# ,-name=>'test'
 .$s->{-cgi}->table($a{-table} ? $a{-table} : (), "\n"
 .join(''
	, map {	my $r =$_;
		$s->{-cgi}->Tr($a{-tr} ? $a{-tr} : (), "\n"
		.join(''
			, map { ($_ =~/^</
				? $s->{-cgi}->td($a{-td} || {-align=>'left', -valign=>'top'}, $_)
				: $s->{-cgi}->th($a{-th} || $a{-td} || {-align=>'left', -valign=>'top'}, $_)
				) ."\n"
				} @$r)

readme  view on Meta::CPAN


    This is free software; you can use redistribute it and/or modify it
    under the same terms as Perl itself.

AUTHOR

    Andrew V Makarow <makarow at mail.com>, for Bank of Russia in Archangel
	
PREREQUISITES

    Currently implemented and tested on Win32 Active Perl 5.8.

HOW TO BUILD AND INSTALL

    Type:
	
	perl Makefile.PL
	make
	make install
    Or:
	copy ./lib/* into perl/site/lib/

test.pl  view on Meta::CPAN

#!perl -w
use strict;
use Test;


BEGIN { plan tests => 2 + 5 + 1}

if (1) {
   print "\nRequired modules:\n";
   foreach my $m ('ARS', 'POSIX') {
     print "use $m\t";
     ok(eval("use $m; 'ok'"), 'ok');
   }
}

if (1) {



( run in 0.361 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )