Skip to content

Instantly share code, notes, and snippets.

@rayvoelker
Last active March 6, 2026 22:28
Show Gist options
  • Select an option

  • Save rayvoelker/66b8bf43f5d840f9c71724433b20ba56 to your computer and use it in GitHub Desktop.

Select an option

Save rayvoelker/66b8bf43f5d840f9c71724433b20ba56 to your computer and use it in GitHub Desktop.
ilsaux Sierra:: Perl Module Documentation (16 modules) - CHPL

Sierra::Address

File: Modules/Sierra/Address.pm Lines: 1385


Exports

@EXPORT_OK:

  • is_well_formed_city_state
  • is_well_formed_county
  • is_well_formed_email
  • is_well_formed_phone
  • is_well_formed_zip
  • check_address
  • cleanup_address
  • cleanup_city_state
  • cleanup_county
  • cleanup_email
  • cleanup_phone
  • cleanup_zip
  • counties_in_state
  • test_city_zip_quality

Subroutines

counties_in_state()

Line 942

is_well_formed_city_state()

Line 952

is_well_formed_county()

Line 958

is_well_formed_email()

Line 965

cleanup_email()

Line 1014

is_well_formed_phone()

Line 1033

is_well_formed_zip()

Line 1044

is_consistent_state_county()

Line 1049

check_address()

Line 1062

cleanup_city_state()

Line 1111

cleanup_county()

Line 1155

cleanup_phone()

Line 1178

cleanup_zip()

Line 1187

test_city_zip_quality()

Line 1198

cleanup_address()

Line 1219

is_ordinal()

Line 1379

Data Structures

  • %name_for_PC (line 36)
  • %cities_for_zip (line 104)
  • %zips_for_city (line 481)
  • %new_city_for (line 754)
  • %standard_for_street (line 777)
  • %standard_for_unit (line 848)
  • %word_for_cardinal (line 878)

Used By

  • Reports/old_perl_scripts/user_data/SierraUserData.pl
  • Reports/userdata/SierraUserData.pl
  • Testing/Reports/userdata/SierraUserData.pl

Sierra::Bibs

File: Modules/Sierra/Bibs.pm Lines: 61 WARNING: Contains credential references (lines: 28)


Exports

@EXPORT_OK:

  • mtype_names_hash

Subroutines

mtype_names_hash()

Line 16

Used By

  • Reports/90dayunfilledholds/Sierra90DayUnfilledHolds.pl
  • Reports/holdsnocopies/HoldsNoCopies.2019-05-22.pl
  • Reports/holdsnocopies/HoldsNoCopies.pl
  • Reports/systemwideholds/SierraSystemWideHolds.pl
  • Testing/Reports/90dayunfilledholds/Sierra90DayUnfilledHolds.pl
  • Testing/Reports/holdsnocopies/HoldsNoCopies.pl
  • Testing/Reports/systemwideholds/SierraSystemWideHolds.pl

Sierra::DB

File: Modules/Sierra/DB.pm Lines: 50


Exports

@EXPORT_OK:

  • sierra_db_query

Subroutines

sierra_db_query($dbh, $query_string)

Line 16

Used By

  • Reports/90dayunfilledholds/Sierra90DayUnfilledHolds.pl
  • Reports/activeusersmonthly/SierraActiveUsersMonthly.pl
  • Reports/activeusersmonthly/SierraActiveUsersMonthly_2019-09-03.pl
  • Reports/activeusersmonthly/SierraActiveUsersMonthly_prev.pl
  • Reports/bookclubrenewal/BookclubRenewal.pl
  • Reports/cleanup/Cleanup.pl
  • Reports/deletedbibs/DeletedBibs.pl
  • Reports/dupeitembarcodes/DupeItemBarcodes.pl
  • Reports/excusedlossbookclub/ExcusedLossBookclub.pl
  • Reports/generic/SierraGenericReport.pl
  • Reports/holdsnocopies/HoldsNoCopies.2019-05-22.pl
  • Reports/holdsnocopies/HoldsNoCopies.pl
  • Reports/maindisplays/MainDisplays.pl
  • Reports/multipleintransitmessages/MultipleIntransitMessages.pl
  • Reports/newlongintransit/NewLongInTransit.pl
  • Reports/nolongernew/NoLongerNew.pl
  • Reports/novelistisbnexport/NovelistISBNExport.pl
  • Reports/oldlongintransit/OldLongInTransit.pl
  • Reports/orangeboy/orangeboy_extract_circ.pl
  • Reports/orangeboy/orangeboy_extract_lookup_tables.pl
  • Reports/orangeboy/orangeboy_extract_patrons.pl
  • Reports/orangeboy/orangeboy_extract_patrons_backup_2018-01-16.pl
  • Reports/removedupfines/RemoveDupFines.pl
  • Reports/renewaldata/renewaldata.pl
  • Reports/slintransit/SierraShelfListInTransit.pl
  • Reports/slrepair/SierraShelfListRepair.pl
  • Reports/systemwideholds/SierraSystemWideHolds.pl
  • Reports/turn13/Turn13.pl
  • Reports/turn18/Turn18.pl
  • Reports/unpaidmanualcharges/UnpaidManualCharges.pl
  • Testing/Reports/90dayunfilledholds/Sierra90DayUnfilledHolds.pl
  • Testing/Reports/activeusersmonthly/SierraActiveUsersMonthly.pl
  • Testing/Reports/bookclubrenewal/BookclubRenewal.pl
  • Testing/Reports/cleanup/Cleanup.pl
  • Testing/Reports/courtesyrenewal/courtesyrenewal.pl
  • Testing/Reports/deletedbibs/DeletedBibs.pl
  • Testing/Reports/holdsnocopies/HoldsNoCopies.pl
  • Testing/Reports/maindisplays/MainDisplays.pl
  • Testing/Reports/newlongintransit/NewLongInTransit.pl
  • Testing/Reports/nolongernew/NoLongerNew.pl
  • Testing/Reports/oldlongintransit/OldLongInTransit.pl
  • Testing/Reports/orangeboy/orangeboy_extract_circ.pl
  • Testing/Reports/orangeboy/orangeboy_extract_lookup_tables.pl
  • Testing/Reports/orangeboy/orangeboy_extract_patrons.pl
  • Testing/Reports/removedupfines/RemoveDupFines.pl
  • Testing/Reports/renewaldata/renewaldata.pl
  • Testing/Reports/slintransit/SierraShelfListInTransit.pl
  • Testing/Reports/slrepair/SierraShelfListRepair.pl
  • Testing/Reports/systemwideholds/SierraSystemWideHolds.pl
  • Testing/Reports/turn18/Turn18.pl

Sierra::FinePayment

File: Modules/Sierra/FinePayment.pm Lines: 340 WARNING: Contains credential references (lines: 25, 47, 48, 136, 165, 190, 191, 192, 193, 194, 195, 289)


Exports

@EXPORT_OK:

  • fine_amnesty_blaster
  • waive_fines

Subroutines

waive_fines($hostname, $patron_num, $invoice_num, $invoice_amt)

Line 19

fine_amnesty_blaster($hostname, $patron_num, @invoice_nums)

Line 159

soapGetBad()

Line 317

utility function to parse SOAP errors

Used By

  • Reports/removedupfines/RemoveDupFines.pl
  • Testing/Reports/removedupfines/RemoveDupFines.pl

Sierra::Floating

File: Modules/Sierra/Floating.pm Lines: 92


Exports

@EXPORT_OK:

  • is_floating
  • should_float
  • says_floating

@EXPORT (auto-imported):

  • says_floating

Subroutines

locn_floats()

Line 32

written for sierra

says_floating()

Line 51

says_floating is used to put the word "Floating" on item labels, therefore needs to be converted for Sierra consider moving this function into Labels.pm

Used By

  • Modules/Sierra/Labels.pm
  • Modules/Sierra/Labels.pm
  • Reports/old_perl_scripts/labels/Sierra/Labels.pm
  • Reports/old_perl_scripts/labels/Sierra/Labels.pm
  • Testing/Modules/Sierra/Labels.pm
  • Testing/Modules/Sierra/Labels.pm

Sierra::IIIUsers

File: Modules/Sierra/IIIUsers.pm Lines: 62 WARNING: Contains credential references (lines: 28)


Exports

@EXPORT_OK:

  • iiiuser_location_codes_hash

Subroutines

iiiuser_location_codes_hash()

Line 16

Used By

  • Reports/intransitstats/IntransitStats.pl
  • Reports/newlongintransit/NewLongInTransit.pl
  • Reports/oldlongintransit/OldLongInTransit.pl
  • Reports/slintransit/SierraShelfListInTransit.pl
  • Testing/Reports/newlongintransit/NewLongInTransit.pl
  • Testing/Reports/oldlongintransit/OldLongInTransit.pl
  • Testing/Reports/slintransit/SierraShelfListInTransit.pl

Sierra::Items

File: Modules/Sierra/Items.pm Lines: 133 WARNING: Contains credential references (lines: 30, 75, 110)


Exports

@EXPORT_OK:

  • itype_names_hash
  • lowest_item_row_id
  • highest_item_row_id

Subroutines

itype_names_hash()

Line 18

lowest_item_row_id()

Line 63

highest_item_row_id()

Line 96

Used By

  • Reports/collectiondetail/books_av_other_xlsx.pl
  • Reports/collectiondetail/by_agency_html (copy).pl
  • Reports/collectiondetail/by_agency_html.pl
  • Reports/collectiondetail/by_agency_html2017.pl
  • Reports/collectiondetail/by_agency_html2018.pl
  • Reports/collectiondetail/by_library_xlsx.pl
  • Reports/gap_finder/GapFinder.pl
  • Reports/novelistisbnexport/NovelistISBNExport.pl
  • Reports/slitemdata/SierraItemData-2021-05-21.pl
  • Reports/slitemdata/SierraItemData-2021-06-01.pl
  • Reports/slitemdata/SierraItemData-2021-10-22.pl
  • Reports/slitemdata/SierraItemData-2021-11-15.pl
  • Reports/slitemdata/SierraItemData-2024-06-03.pl
  • Reports/slitemdata/SierraItemData.2018-06-19.pl
  • Reports/slitemdata/SierraItemData.2019-03-05.pl
  • Reports/slitemdata/SierraItemData.2020-01-10.pl
  • Reports/slitemdata/SierraItemData.2020-03-06.pl
  • Reports/slitemdata/SierraItemData.2021-08-06.pl
  • Reports/slitemdata/SierraItemData.2021-09-16.pl
  • Reports/slitemdata/SierraItemData.2021-10-07.pl
  • Reports/slitemdata/SierraItemData.pl
  • Reports/slitemdata/SierraItemData_2020-09-09.pl
  • Reports/slitemdata/SierraItemData_2020-11-20.pl
  • SierraItemData.pl
  • Testing/Reports/slitemdata/SierraItemData.pl
  • slitemdata-2020-09-09/SierraItemData.2018-06-19.pl
  • slitemdata-2020-09-09/SierraItemData.2019-03-05.pl
  • slitemdata-2020-09-09/SierraItemData.2020-01-10.pl
  • slitemdata-2020-09-09/SierraItemData.2020-03-06.pl
  • slitemdata-2020-09-09/SierraItemData.pl
  • slitemdata/SierraItemData.2018-06-19.pl
  • slitemdata/SierraItemData.2019-03-05.pl
  • slitemdata/SierraItemData.2020-01-10.pl
  • slitemdata/SierraItemData.2020-03-06.pl
  • slitemdata/SierraItemData.pl

Sierra::Labels

File: Modules/Sierra/Labels.pm Lines: 1529 WARNING: Contains credential references (lines: 187, 272, 486, 487)


Exports

@EXPORT_OK:

  • is_plch_barcode

@EXPORT (auto-imported):

  • get_label_requests_for_edited_items
  • get_label_requests_for_new_items
  • get_replacement_label_requests
  • get_training_label_requests
  • get_info_for_requested_items
  • produce_and_distribute_labels

Subroutines

get_label_requests_for_edited_items()

Line 161

get_label_requests_for_new_items()

Line 242

get_replacement_label_requests()

Line 331

get_training_label_requests()

Line 398

get_info_for_requested_items($label_request_ref, $item_info_ref, $arg_ref)

Line 445

produce_and_distribute_labels()

Line 887

create_label_PDFs()

Line 991

add_disc_label()

Line 1083

add_book_label()

Line 1241

get_spine_lines()

Line 1312

draw_disc_stickers()

Line 1345

draw_book_stickers()

Line 1390

rounded_rect($gfx, $left, $bottom, $width, $height, $radius)

Line 1427

oneline_sticker($gfx, $left, $bottom, $width, $height)

Line 1446

fit_text($obj, $x, $y, $face, $size, $text, $width, $opt_ref)

Line 1464

compare_itemids($alpha, $beta)

Line 1510

is_plch_barcode()

Line 1523

Data Structures

  • %ict1_for_bcode2 (line 48)
  • %agency_for_two_letter_prefix (line 77)

Used By

  • Reports/labels/ReplaceLabels.pl
  • Reports/labels/SierraLabels.pl
  • Reports/old_perl_scripts/labels/ReplaceLabels.pl
  • Reports/old_perl_scripts/labels/SierraLabels.pl
  • Reports/old_perl_scripts/labels/SierraLabelsTest.pl
  • Reports/replacelabels/ReplaceLabels.pl
  • Testing/Reports/labels/ReplaceLabels.pl
  • Testing/Reports/labels/SierraLabels.pl

Sierra::Locations

File: Modules/Sierra/Locations.pm Lines: 114 WARNING: Contains credential references (lines: 80)


Exports

@EXPORT_OK:

  • location_names_hash
  • is_branch_prefix
  • is_location_offsite
  • is_location_virtual
  • is_location_innreach
  • is_location_administrative

Subroutines

is_branch_prefix()

Line 21

is_location_offsite()

Line 26

is_location_virtual()

Line 31

is_location_administrative()

Line 36

is_location_innreach()

Line 41

location_names_hash()

Line 68

Used By

  • Modules/Sierra/Shelflist.pm
  • Reports/bookclubrenewal/BookclubRenewal.pl
  • Reports/cleanup/Cleanup.pl
  • Reports/collectiondetail/by_agency_html (copy).pl
  • Reports/collectiondetail/by_agency_html.pl
  • Reports/collectiondetail/by_agency_html2017.pl
  • Reports/collectiondetail/by_agency_html2018.pl
  • Reports/collectiondetail/by_library_xlsx.pl
  • Reports/intransitstats/IntransitStats.pl
  • Reports/newlongintransit/NewLongInTransit.pl
  • Reports/olddvds/olddvds-special.pl
  • Reports/olddvds/olddvds.pl
  • Reports/oldlongintransit/OldLongInTransit.pl
  • Reports/slintransit/SierraShelfListInTransit.pl
  • Reports/slintransit/test.pl
  • Reports/slitemdata/SierraItemData-2021-05-21.pl
  • Reports/slitemdata/SierraItemData-2021-06-01.pl
  • Reports/slitemdata/SierraItemData-2021-10-22.pl
  • Reports/slitemdata/SierraItemData-2021-11-15.pl
  • Reports/slitemdata/SierraItemData-2024-06-03.pl
  • Reports/slitemdata/SierraItemData.2018-06-19.pl
  • Reports/slitemdata/SierraItemData.2019-03-05.pl
  • Reports/slitemdata/SierraItemData.2020-01-10.pl
  • Reports/slitemdata/SierraItemData.2020-03-06.pl
  • Reports/slitemdata/SierraItemData.2021-08-06.pl
  • Reports/slitemdata/SierraItemData.2021-09-16.pl
  • Reports/slitemdata/SierraItemData.2021-10-07.pl
  • Reports/slitemdata/SierraItemData.pl
  • Reports/slitemdata/SierraItemData_2020-09-09.pl
  • Reports/slitemdata/SierraItemData_2020-11-20.pl
  • Reports/slonorder/SierraShelfListOnOrder.pl
  • Reports/slrepair/SierraShelfListRepair.pl
  • SierraItemData.pl
  • Testing/Modules/Sierra/Shelflist.pm
  • Testing/Modules/Sierra/Shelflist_ORIG.pm
  • Testing/Reports/bookclubrenewal/BookclubRenewal.pl
  • Testing/Reports/cleanup/Cleanup.pl
  • Testing/Reports/newlongintransit/NewLongInTransit.pl
  • Testing/Reports/olddvds/olddvds-special.pl
  • Testing/Reports/olddvds/olddvds.pl
  • Testing/Reports/oldlongintransit/OldLongInTransit.pl
  • Testing/Reports/slintransit/SierraShelfListInTransit.pl
  • Testing/Reports/slitemdata/SierraItemData.pl
  • Testing/Reports/slonorder/SierraShelfListOnOrder.pl
  • Testing/Reports/slrepair/SierraShelfListRepair.pl
  • slitemdata-2020-09-09/SierraItemData.2018-06-19.pl
  • slitemdata-2020-09-09/SierraItemData.2019-03-05.pl
  • slitemdata-2020-09-09/SierraItemData.2020-01-10.pl
  • slitemdata-2020-09-09/SierraItemData.2020-03-06.pl
  • slitemdata-2020-09-09/SierraItemData.pl
  • slitemdata/SierraItemData.2018-06-19.pl
  • slitemdata/SierraItemData.2019-03-05.pl
  • slitemdata/SierraItemData.2020-01-10.pl
  • slitemdata/SierraItemData.2020-03-06.pl
  • slitemdata/SierraItemData.pl

Sierra::MARCtoLatin

File: Modules/Sierra/MARCtoLatin.pm Lines: 268


Exports

@EXPORT (auto-imported):

  • CharConv

Subroutines

CharConv()

Line 16

Used By

  • Reports/labels/SierraLabelsFontTest.pl
  • Testing/Reports/labels/SierraLabelsFontTest.pl

Sierra::PatronSoap

File: Modules/Sierra/PatronSoap.pm Lines: 188


Exports

No exports defined.

Subroutines

new()

Line 10

init_pf_array()

Line 27

get_soap_data()

Line 81

get_pf_array()

Line 88

get_ftn_hash()

Line 95

add_note()

Line 103

add_message()

Line 132

alter_fields()

Line 153

Used By

  • Modules/Sierra/SoapApi.pm
  • Modules/Sierra/SoapApi.pm
  • Reports/patron_update/soapootest.pl
  • Reports/turn18/Turn18.pl
  • Reports/userdata/SierraUserData.pl
  • Testing/Modules/Sierra/SoapApi.pm
  • Testing/Modules/Sierra/SoapApi.pm
  • Testing/Reports/turn18/Turn18.pl
  • Testing/Reports/userdata/SierraUserData.pl

Sierra::PatronUpdate

File: Modules/Sierra/PatronUpdate.pm Lines: 328 WARNING: Contains credential references (lines: 25, 48, 277)


Exports

@EXPORT_OK:

  • change_patron_field

Subroutines

change_patron_field($hostname, $patron, $field_to_change, $new_value, $note_text)

Line 19

soapGetBad()

Line 305

utility function to parse SOAP errors

Used By

  • Reports/autoextend/SierraAutoExtend.pl
  • Reports/birthdatesync/SierraBirthdateSync.pl
  • Reports/patron_update/changePatronTest.pl
  • Reports/turn13/Turn13.pl
  • Reports/turn18/Turn18.pl
  • Reports/userdata/SierraUserData.pl
  • Testing/Reports/turn18/Turn18.pl
  • Testing/Reports/userdata/SierraUserData.pl

Sierra::Shelflist

File: Modules/Sierra/Shelflist.pm Lines: 219


Exports

No exports defined.

Subroutines

new()

Line 44

init()

Line 65

get_xmlfiles_array()

Line 93

get_filehandlefor_hash($self, $list, %item_info)

Line 100

add_to_item_list($self, $list, %item_info)

Line 108

start_list_file($self, $libr)

Line 133

finish()

Line 160

upload($self, %args)

Line 177

escapeXML($text)

Line 205

Used By

  • Reports/newlongintransit/NewLongInTransit.pl
  • Reports/nolongernew/NoLongerNew.pl
  • Reports/oldlongintransit/OldLongInTransit.pl
  • Reports/slintransit/SierraShelfListInTransit.pl
  • Testing/Reports/newlongintransit/NewLongInTransit.pl
  • Testing/Reports/nolongernew/NoLongerNew.pl
  • Testing/Reports/oldlongintransit/OldLongInTransit.pl
  • Testing/Reports/slintransit/SierraShelfListInTransit.pl

Sierra::SoapApi

File: Modules/Sierra/SoapApi.pm Lines: 141 WARNING: Contains credential references (lines: 17, 55, 62, 80, 103)


Exports

No exports defined.

Subroutines

new()

Line 10

setup_connection()

Line 29

search_patron()

Line 49

update_patron()

Line 74

soapGetBad()

Line 113

utility function to parse SOAP errors

Used By

  • Reports/patron_update/soapootest.pl
  • Reports/turn18/Turn18.pl
  • Reports/userdata/SierraUserData.pl
  • Testing/Reports/turn18/Turn18.pl
  • Testing/Reports/userdata/SierraUserData.pl

Sierra::Tools

File: Modules/Sierra/Tools.pm Lines: 206


Exports

@EXPORT_OK:

  • is_internal_ip
  • create_directory_if_needed
  • get_parent_directory_of
  • write_string_to_file
  • get_iso_timestamp
  • days_in_month
  • YYYYMMDD_to_MDY
  • YYYYMMDD_to_Y_M_D
  • YYYYMM_to_Y_M
  • YYYYMM_to_MonthYear
  • Y_M_D_to_MonthDayYear
  • Excel_date
  • date_years_delta
  • is_leap_year
  • calculate_check_digit

Subroutines

calculate_check_digit($record_number)

Line 29

is_internal_ip()

Line 58

get_parent_directory_of()

Line 72

uses methods from File::Spec to return the parent directory for the given directory

create_directory_if_needed()

Line 82

write_string_to_file($string, $filename)

Line 94

get_iso_timestamp($year, $month)

Line 104

days_in_month($year, $month)

Line 109

YYYYMMDD_to_Y_M_D($YYYYMMDD)

Line 118

YYYYMMDD_to_MDY($YYYYMMDD)

Line 128

YYYYMM_to_Y_M($YYYYMM)

Line 138

YYYYMM_to_MonthYear($YYYYMM)

Line 147

Y_M_D_to_MonthDayYear($year, $month, $day)

Line 156

Excel_date($year, $month, $mday)

Line 163

date_years_delta()

Line 183

is_leap_year()

Line 196

Used By

  • Modules/Sierra/UserData.pm
  • Modules/Sierra/UserData.pm
  • Modules/Sierra/UserData.pm
  • Reports/newdvds/newdvds.pl
  • Reports/old_perl_scripts/user_data/SierraUserData.pl
  • Reports/userdata/SierraUserData.pl
  • Testing/Modules/Sierra/UserData.pm
  • Testing/Modules/Sierra/UserData.pm
  • Testing/Modules/Sierra/UserData.pm
  • Testing/Reports/newdvds/newdvds.pl
  • Testing/Reports/userdata/SierraUserData.pl

Sierra::UserData

File: Modules/Sierra/UserData.pm Lines: 479


Exports

@EXPORT_OK:

  • is_good_birthdate
  • is_good_suffix
  • is_well_formed_cat2
  • is_well_formed_pcode1
  • is_well_formed_pcode2
  • is_well_formed_pcode3
  • is_well_formed_notify
  • is_well_formed_userid
  • check_adultonly
  • check_educator
  • check_childonly
  • check_birthdates
  • check_expdate
  • check_guardian
  • check_name
  • check_names
  • cleanup_name
  • cleanup_name_component
  • cleanup_name_suffix
  • cleanup_notify

Subroutines

is_good_birthdate()

Line 60

is_good_suffix()

Line 68

is_well_formed_cat2()

Line 75

this will no longer be used, remove later...

is_well_formed_pcode1()

Line 81

is_well_formed_pcode2()

Line 87

is_well_formed_pcode3()

Line 93

is_well_formed_notify()

Line 99

is_well_formed_userid()

Line 106

check_educator()

Line 146

check_childonly()

Line 211

check_adultonly()

Line 223

check_birthdates()

Line 235

check_expdate()

Line 266

check_guardian()

Line 350

check_notify()

Line 366

cleanup_name()

Line 373

cleanup_name_component()

Line 390

cleanup_name_suffix()

Line 403

check_name()

Line 415

check_names()

Line 446

cleanup_notify()

Line 470

Used By

  • Reports/old_perl_scripts/user_data/SierraUserData.pl
  • Reports/userdata/SierraUserData.pl
  • Testing/Reports/userdata/SierraUserData.pl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment