Jerzy Wachowiak > Apache-FastForward-1.1 > Apache::FastForward

Download:
Apache-FastForward-1.1.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.1   Source  

NAME ^

Apache::FastForward - new age of spreadsheet web services

SYNOPSIS ^

 package AAA::Demo;

 use Apache::Constants qw( :common );
 use Apache::FastForward;

 sub handler {
     
     my $r = Apache::FastForward->new( shift );
      
     my $user = $r->user();
     $r->send_http_header( 'text/plain' );
    
     $r->ParseBody();

     unless ( $r->IsDefinedTable( 'item', 'quantity' ) ){
            print 'Something went wrong...';
            return OK
     }

     my @item_quantity_table = $r->GetTable( 'item', 'quantity' );
     foreach my $row ( @item_quantity_table ){
          print $row->{item}}, $row->{quantity}
     }
 ...

DESCRIPTION ^

USAGE

The module is part of the FastForward project, which aim is to allow fast development of web based spreadsheet applications. Apache::FastForward implements receiving CSV formatted data by the POST request and their convenient manipulation on the server site. It solves similar problems as FORMS in the html. Apache::FastForward inherits from the Apache module (see Apache). For more details please see http://fastforward.sourceforge.net.

METHODS

ParseBody ( $encoding )

Parses the body of the POST request and stores inside the class instance. Encoding as input (if nothing defaults to UTF-8). Output: returning success (1) or failure(0).

GetTable ( $col1, $col2, $col3 )

Column names from the POST request (order does not matter). Output: array of hashes [ {col1=> var11, col2=>var12}, {col1=> var21, col2=>var22} ] or undef if nothing exists.

IsBodyEmpty ( )

Checks, if the POST body is empty. No input (valid for last parsed body - passed via the class instance). Output: body is empty->check success (1) or body is not empty-> failure(0).

IsDefinedHeader ( $col1, $col2, $col3 )

Checks, if a set of column names (header) for a table is defined inside of the POST body. Column names as input (order does not matter).Output: check success (1) or failure(0).

IsDefinedTable ( $col1, $col2, $col3 )

Checks, if a table with the column names and some data is inside of the POST body. Column names as input (order does not matter - a set of column names defines a table).Output: check success (1) or failure(0).

ListHeaders ( )

No input (valid for last parsed body - passed via class instance). Output: array of headers (sets of column names defining a tables) or undef if nothing.

ListTables ( )

No input (valid for last parsed body - passed via class instance). Output: array of headers of tables (sets of column names defining a tables, where is some data inside) or undef if nothing.

BUGS ^

Any suggestions for improvement are welcomed!

If a bug is detected or nonconforming behavior, please send an error report to <jwach@cpan.org>.

COPYRIGHT ^

Copyright 2006 Jerzy Wachowiak <jwach@cpan.org>

This library is free software; you can redistribute it and/or modify it under the terms of the Apache 2.0 license attached to the module.

SEE ALSO ^

Apache::FastForward::Spreadsheet

syntax highlighting: