Changeset 31617 for main/trunk


Ignore:
Timestamp:
2017-04-20T20:31:54+12:00 (7 years ago)
Author:
ak19
Message:

Removing the debugging.

Location:
main/trunk/greenstone2/perllib/cgiactions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cgiactions/metadataaction.pm

    r31602 r31617  
    3535use JSON;
    3636
     37# This class is conditionally expanded with set-metadata, remove-metadata and insert-metadata subroutines
     38# defined in modmetadataaction.pm. The BEGIN code block determines whether the condition holds.
     39# See
    3740# http://stackoverflow.com/questions/3998619/what-is-the-role-of-the-begin-block-in-perl
    3841# http://www.perlmonks.org/?node_id=881761 - splitting module into multiple files
     
    5255
    5356    if(!defined $ENV{'GSDL3HOME'} || (defined $ENV{'GS3_AUTHENTICATED'} && $ENV{'GS3_AUTHENTICATED'} eq "true")) {
    54     print STDERR "\nIncluding modmeta...\n";
    5557    require modmetadataaction;
    5658    }
     
    5860    $modmeta_action_table = {};
    5961    }
    60     print STDERR "End of metadata::BEGIN\n\n";
    6162}
    6263
     
    9596};
    9697
    97 print STDERR "\nMODMETA_TABLE 2: " .join(",", keys $metadataaction::modmeta_action_table) ."\n";
    98 
    99 
    100 # merge the hashes - http://www.perlmonks.org/?node_id=524456
     98# To get the final action_table of all available subroutines in this class,
     99# merge the get- and mod-metadata hashes. See http://www.perlmonks.org/?node_id=524456
     100# Note that modmeta_action_table will be empty of subroutines if the user does not have permissions
     101# to modify metadata.
    101102my $action_table = { %$getmeta_action_table, %$modmeta_action_table };
    102103
  • main/trunk/greenstone2/perllib/cgiactions/modmetadataaction.pm

    r31602 r31617  
    3232# and how variables declared with 'our' are used there.
    3333
    34 # http://stackoverflow.com/questions/3998619/what-is-the-role-of-the-begin-block-in-perl
    35 # http://www.perlmonks.org/?node_id=881761 - splitting module into multiple files
    36 # http://www.perlmonks.org/?node_id=524456 - merging hashes
    37 
    3834package metadataaction;
    3935
     
    4642
    4743use JSON;
    48 
    49 
    50 BEGIN {
    51     print STDERR "In ModMeta\n";
    52 }
    5344
    5445
     
    134125        'optional-args'   => [ ] }
    135126};
    136 
    137 print STDERR "\nMODMETA_TABLE: " .join(",", keys $metadataaction::modmeta_action_table) ."\n";
    138127
    139128
     
    26702659
    26712660# not returning 1; here since this file is conditionally included by metadataction.pm
     2661# and not otherwise meant to be used on its own
     2662
Note: See TracChangeset for help on using the changeset viewer.