return ($userenv->{flags}//0) % 2;
}
=head2 setCommandlineEnvironment
Sets the Koha environment for command line scripts.
=cut
sub setCommandlineEnvironment {
my ($class) = @_;
C4::Context->interface('commandline'); #Set interface for logger and friends
C4::Context->_new_userenv('commandline');
C4::Context::set_userenv(1,0,0,'commandline',$0, '', '', {}, '', '', '');
=head2 interface
Sets the current interface for later retrieval in any Perl module
-