Nate Lewis


FWS::V2::Check - Framework Sites version 2 validation and checking methods


Version 1.13091122


        use FWS::V2;

        # Create $fws
        my $fws = FWS::V2->new();

        # all simple boolean response in conditionals
        if ( $fws->isValidEmail( '') ) { print "Its not real, but it could be!\n" } 
        else { print "Yuck, bad email.\n" } 


Simple methods that will return boolean results based on the validation of the passed parameter.



Return a 0 or 1 depending if a admin user is currently logged in.

    # do something if logged in as an admin user
    if ( $fws->isAdminLoggedIn() ) { $valueHash{html} .= 'I am logged in as a admin<br/>' }


Return a 0 or 1 depending if a site user is currently logged in.

        # do something if logged in as an site user
        if ( $fws->isUserLoggedIn() ) { $valueHash{html} .= 'I am logged in as a user<br/>' }


Return a boolean response to validate if an email address is well formed.


Built in captcha support will return 1 or 0 based on the last captcha post.


FWS standard strong password checker. Upper, lower, number, at least 6 chars.


See if an element is present on the current page. This is here for some legacy code but should not be used because it is not good practice and could be slow if the page is complex. Just find another way to achieve the same result of knowing if something is present on a page.


Return the amount of time between two dates in days or seconds.

Possible Parameters:

  • date

    The base date to compare against

  • compDate

    A date in the future or past compare it to. If not passed, the current date will be used.

  • format

    The date format used. Default is SQLTime, you can choose epoch as an alternative

  • type

    The compare type to return as. Default is in 'seconds', you set this to 'days' if you would like the amount in days with its remainder as a decimal.


Nate Lewis, <nlewis at>


Please report any bugs or feature requests to bug-fws-lite at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc FWS::V2::Check

You can also look for information at:


Copyright 2013 Nate Lewis.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.